1
1
mirror of https://github.com/bitcoin/bitcoin.git synced 2024-05-17 23:56:39 +00:00

Merge #20568: doc: Use FeeModes doc helper in estimatesmartfee

fa8abdc9953e381715493b259908e246914793b0 rpc: Use FeeModes doc helper in estimatesmartfee (MarcoFalke)

Pull request description:

  Not sure why this doesn't use the doc helper, probably an oversight?

ACKs for top commit:
  laanwj:
    Code review ACK fa8abdc9953e381715493b259908e246914793b0

Tree-SHA512: 1f2dc8356e3476ddcf9cafafa7f9865ad95bed1e3067c0edab8e3c483e374bdbdbecc066167554b4a1b479e28f6a52c4ae6a75a70c67ee4e1ff4f3ba36b04001
This commit is contained in:
Wladimir J. van der Laan 2020-12-07 13:54:49 +01:00
commit 5c4911e7e7
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D
2 changed files with 11 additions and 11 deletions

View File

@ -1022,21 +1022,19 @@ static RPCHelpMan submitheader()
static RPCHelpMan estimatesmartfee() static RPCHelpMan estimatesmartfee()
{ {
return RPCHelpMan{"estimatesmartfee", return RPCHelpMan{"estimatesmartfee",
"\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n" "\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
"confirmation within conf_target blocks if possible and return the number of blocks\n" "confirmation within conf_target blocks if possible and return the number of blocks\n"
"for which the estimate is valid. Uses virtual transaction size as defined\n" "for which the estimate is valid. Uses virtual transaction size as defined\n"
"in BIP 141 (witness data is discounted).\n", "in BIP 141 (witness data is discounted).\n",
{ {
{"conf_target", RPCArg::Type::NUM, RPCArg::Optional::NO, "Confirmation target in blocks (1 - 1008)"}, {"conf_target", RPCArg::Type::NUM, RPCArg::Optional::NO, "Confirmation target in blocks (1 - 1008)"},
{"estimate_mode", RPCArg::Type::STR, /* default */ "CONSERVATIVE", "The fee estimate mode.\n" {"estimate_mode", RPCArg::Type::STR, /* default */ "conservative", "The fee estimate mode.\n"
" Whether to return a more conservative estimate which also satisfies\n" " Whether to return a more conservative estimate which also satisfies\n"
" a longer history. A conservative estimate potentially returns a\n" " a longer history. A conservative estimate potentially returns a\n"
" higher feerate and is more likely to be sufficient for the desired\n" " higher feerate and is more likely to be sufficient for the desired\n"
" target, but is not as responsive to short term drops in the\n" " target, but is not as responsive to short term drops in the\n"
" prevailing fee market. Must be one of:\n" " prevailing fee market. Must be one of (case insensitive):\n"
" \"UNSET\"\n" "\"" + FeeModes("\"\n\"") + "\""},
" \"ECONOMICAL\"\n"
" \"CONSERVATIVE\""},
}, },
RPCResult{ RPCResult{
RPCResult::Type::OBJ, "", "", RPCResult::Type::OBJ, "", "",

View File

@ -41,6 +41,8 @@ class EstimateFeeTest(BitcoinTestFramework):
self.nodes[0].estimatesmartfee(1) self.nodes[0].estimatesmartfee(1)
# self.nodes[0].estimatesmartfee(1, None) # self.nodes[0].estimatesmartfee(1, None)
self.nodes[0].estimatesmartfee(1, 'ECONOMICAL') self.nodes[0].estimatesmartfee(1, 'ECONOMICAL')
self.nodes[0].estimatesmartfee(1, 'unset')
self.nodes[0].estimatesmartfee(1, 'conservative')
self.nodes[0].estimaterawfee(1) self.nodes[0].estimaterawfee(1)
self.nodes[0].estimaterawfee(1, None) self.nodes[0].estimaterawfee(1, None)