Merge bitcoin/bitcoin#25339: RPC/blockchain: Elaborate on scantxoutset documentation

7862c4ac4e RPC/blockchain: Reorder result documentation for scantxoutset (Luke Dashjr)
98718d03be scripted-diff: RPC/blockchain: Lowercase "when" in scantxoutset documentation (Luke Dashjr)
b283e4d823 RPC/blockchain: Elaborate on scantxoutset documentation (Luke Dashjr)

Pull request description:

  Minor doc improvements

ACKs for top commit:
  achow101:
    ACK 7862c4ac4e

Tree-SHA512: a8b16a9b77c3ca216ce2556c26d6a049b12f73500bdb35c172432409b3b9321cc24a08daca1210926e0f75674b2e680e850637700c516c195fb75ce6555c17c4
This commit is contained in:
MacroFake 2022-06-15 08:58:54 +02:00
commit fa07ee165e
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
1 changed files with 7 additions and 7 deletions

View File

@ -2040,13 +2040,7 @@ static RPCHelpMan scantxoutset()
"[scanobjects,...]"},
},
{
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{"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"},
{RPCResult::Type::NUM, "height", "The current block height (index)"},
@ -2065,6 +2059,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{
HelpExampleCli("scantxoutset", "start \'[\"" + EXAMPLE_DESCRIPTOR_RAW + "\"]\'") +