0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

rpc: Use FeeModes doc helper in estimatesmartfee

Can be reviewed with --ignore-all-space
This commit is contained in:
MarcoFalke 2020-12-04 09:58:59 +01:00
parent a0489f3472
commit fa8abdc995
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
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)