mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
rpc: Properly document scantxoutset return value
Can be reviewed with --ignore-all-space
This commit is contained in:
parent
faa2059547
commit
fabaccf031
1 changed files with 54 additions and 49 deletions
|
@ -2151,25 +2151,29 @@ static RPCHelpMan scantxoutset()
|
||||||
"For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n",
|
"For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n",
|
||||||
{
|
{
|
||||||
{"action", RPCArg::Type::STR, RPCArg::Optional::NO, "The action to execute\n"
|
{"action", RPCArg::Type::STR, RPCArg::Optional::NO, "The action to execute\n"
|
||||||
" \"start\" for starting a scan\n"
|
"\"start\" for starting a scan\n"
|
||||||
" \"abort\" for aborting the current scan (returns true when abort was successful)\n"
|
"\"abort\" for aborting the current scan (returns true when abort was successful)\n"
|
||||||
" \"status\" for progress report (in %) of the current scan"},
|
"\"status\" for progress report (in %) of the current scan"},
|
||||||
{"scanobjects", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "Array of scan objects. Required for \"start\" action\n"
|
{"scanobjects", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "Array of scan objects. Required for \"start\" action\n"
|
||||||
" Every scan object is either a string descriptor or an object:",
|
"Every scan object is either a string descriptor or an object:",
|
||||||
{
|
{
|
||||||
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "An output descriptor"},
|
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "An output descriptor"},
|
||||||
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "An object with output descriptor and metadata",
|
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "An object with output descriptor and metadata",
|
||||||
{
|
{
|
||||||
{"desc", RPCArg::Type::STR, RPCArg::Optional::NO, "An output descriptor"},
|
{"desc", RPCArg::Type::STR, RPCArg::Optional::NO, "An output descriptor"},
|
||||||
{"range", RPCArg::Type::RANGE, /* default */ "1000", "The range of HD chain indexes to explore (either end or [begin,end])"},
|
{"range", RPCArg::Type::RANGE, /* default */ "1000", "The range of HD chain indexes to explore (either end or [begin,end])"},
|
||||||
},
|
}},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"[scanobjects,...]"},
|
"[scanobjects,...]"},
|
||||||
},
|
},
|
||||||
RPCResult{
|
|
||||||
RPCResult::Type::OBJ, "", "",
|
|
||||||
{
|
{
|
||||||
|
RPCResult{"When action=='abort'", RPCResult::Type::BOOL, "", ""},
|
||||||
|
RPCResult{"When action=='status' and no scan is in progress", RPCResult::Type::NONE, "", ""},
|
||||||
|
RPCResult{"When action=='status' and scan is in progress", RPCResult::Type::OBJ, "", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::NUM, "progress", "The scan progress"},
|
||||||
|
}},
|
||||||
|
RPCResult{"When action=='start'", RPCResult::Type::OBJ, "", "", {
|
||||||
{RPCResult::Type::BOOL, "success", "Whether the scan was completed"},
|
{RPCResult::Type::BOOL, "success", "Whether the scan was completed"},
|
||||||
{RPCResult::Type::NUM, "txouts", "The number of unspent transaction outputs scanned"},
|
{RPCResult::Type::NUM, "txouts", "The number of unspent transaction outputs scanned"},
|
||||||
{RPCResult::Type::NUM, "height", "The current block height (index)"},
|
{RPCResult::Type::NUM, "height", "The current block height (index)"},
|
||||||
|
@ -2188,6 +2192,7 @@ static RPCHelpMan scantxoutset()
|
||||||
}},
|
}},
|
||||||
{RPCResult::Type::STR_AMOUNT, "total_amount", "The total amount of all found unspent outputs in " + CURRENCY_UNIT},
|
{RPCResult::Type::STR_AMOUNT, "total_amount", "The total amount of all found unspent outputs in " + CURRENCY_UNIT},
|
||||||
}},
|
}},
|
||||||
|
},
|
||||||
RPCExamples{""},
|
RPCExamples{""},
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue