0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

RPC/blockchain: Reorder result documentation for scantxoutset

start, abort, status (with result), and status (no result) makes more logical sense
This commit is contained in:
Luke Dashjr 2022-06-13 14:09:48 +00:00
parent 98718d03be
commit 7862c4ac4e

View file

@ -2305,12 +2305,6 @@ static RPCHelpMan scantxoutset()
"[scanobjects,...]"},
},
{
RPCResult{"when action=='abort'", RPCResult::Type::BOOL, "success", "True if scan will be aborted (not necessarily before this RPC returns), or false if there is no scan to abort"},
RPCResult{"when action=='status' and no scan is in progress - possibly already completed", RPCResult::Type::NONE, "", ""},
RPCResult{"when action=='status' and a scan is currently in progress", RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::NUM, "progress", "Approximate percent complete"},
}},
RPCResult{"when action=='start'; only returns after scan completes", RPCResult::Type::OBJ, "", "", {
{RPCResult::Type::BOOL, "success", "Whether the scan was completed"},
{RPCResult::Type::NUM, "txouts", "The number of unspent transaction outputs scanned"},
@ -2330,6 +2324,12 @@ static RPCHelpMan scantxoutset()
}},
{RPCResult::Type::STR_AMOUNT, "total_amount", "The total amount of all found unspent outputs in " + CURRENCY_UNIT},
}},
RPCResult{"when action=='abort'", RPCResult::Type::BOOL, "success", "True if scan will be aborted (not necessarily before this RPC returns), or false if there is no scan to abort"},
RPCResult{"when action=='status' and a scan is currently in progress", RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::NUM, "progress", "Approximate percent complete"},
}},
RPCResult{"when action=='status' and no scan is in progress - possibly already completed", RPCResult::Type::NONE, "", ""},
},
RPCExamples{""},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue