From b283e4d823cc29c0151f02c43203d3a0253e383c Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 11 Jun 2022 15:27:13 +0000 Subject: RPC/blockchain: Elaborate on scantxoutset documentation --- src/rpc/blockchain.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index c4a89c9772..14454c7542 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2305,13 +2305,13 @@ 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{"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", "The scan progress"}, + {RPCResult::Type::NUM, "progress", "Approximate percent complete"}, }}, - 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)"}, -- cgit v1.2.3 From 98718d03be5795905b17d23959ab400db0f8664f Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 11 Jun 2022 17:11:36 +0000 Subject: scripted-diff: RPC/blockchain: Lowercase "when" in scantxoutset documentation -BEGIN VERIFY SCRIPT- sed -i -e 's/"When /"when /' $(git grep -l 'RPCResult{"When ') -END VERIFY SCRIPT- --- src/rpc/blockchain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 14454c7542..cb6706cd55 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2305,13 +2305,13 @@ 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{"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{"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)"}, -- cgit v1.2.3 From 7862c4ac4e7afc954ef9e2c7ee8c556e1654a374 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 13 Jun 2022 14:09:48 +0000 Subject: RPC/blockchain: Reorder result documentation for scantxoutset start, abort, status (with result), and status (no result) makes more logical sense --- src/rpc/blockchain.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index cb6706cd55..0556451e1a 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -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 -- cgit v1.2.3