Skip to content

Commit

Permalink
[doc, rpc]: clarify meaning of block result of estimatesmartfee RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelsadeeq committed Jul 26, 2024
1 parent 6446cbc commit f38aaef
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/rpc/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,24 @@ static RPCHelpMan estimatesmartfee()
"for which the estimate is valid. Uses virtual transaction size as defined\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 (2 - 1008)"},
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"economical"}, "The fee estimate mode.\n"
+ FeeModesDetail()},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::NUM, "feerate", /*optional=*/true, "estimate fee rate in " + CURRENCY_UNIT + "/kvB (only present if no errors were encountered)"},
{RPCResult::Type::ARR, "errors", /*optional=*/true, "Errors encountered during processing (if there are any)",
{RPCResult::Type::ARR, "errors", /*optional=*/true, "Errors encountered during processing. An error is returned if not enough transactions\n"
"and blocks have been tracked to make an estimate for any number of blocks.",
{
{RPCResult::Type::STR, "", "error"},
}},
{RPCResult::Type::NUM, "blocks", "block number where estimate was found\n"
"The request target will be clamped between 2 and the highest target\n"
"fee estimation is able to return based on how long it has been running.\n"
"An error is returned if not enough transactions and blocks\n"
"have been observed to make an estimate for any number of blocks."},
{RPCResult::Type::NUM, "blocks", "The returned fee rate estimate will likely result in the\n"
"transaction starting to confirm within the returned \"blocks\" value.\n"
"If an estimate for the exact conf_target cannot be provided,\n"
"the nearest possible target for which an estimate can be given will be returned.\n"
"Fee estimation is able to return based on how long it has been running."},
}},
RPCExamples{
HelpExampleCli("estimatesmartfee", "6") +
Expand Down

0 comments on commit f38aaef

Please sign in to comment.