aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-11-30 11:03:24 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-12-02 14:30:29 +0100
commit1ed5681407adc1acc60c9bfebde5819f077f0bf3 (patch)
treec6f0de7db5e9416fd938effb6a867bbe064c5077 /src/rpc/blockchain.cpp
parent383d350bd5107bfe00e3b90a00cab9a3c1397c72 (diff)
downloadbitcoin-1ed5681407adc1acc60c9bfebde5819f077f0bf3.tar.xz
rpc: add missing scantxoutset examples
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 55048f6811..35dac8237a 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2296,6 +2296,9 @@ public:
static RPCHelpMan scantxoutset()
{
+ // scriptPubKey corresponding to mainnet address 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S
+ const std::string EXAMPLE_DESCRIPTOR_RAW = "raw(76a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac)#fm24fxxy";
+
return RPCHelpMan{"scantxoutset",
"\nScans the unspent transaction output set for entries that match certain output descriptors.\n"
"Examples of output descriptors are:\n"
@@ -2353,7 +2356,14 @@ static RPCHelpMan scantxoutset()
{RPCResult::Type::STR_AMOUNT, "total_amount", "The total amount of all found unspent outputs in " + CURRENCY_UNIT},
}},
},
- RPCExamples{""},
+ RPCExamples{
+ HelpExampleCli("scantxoutset", "start \'[\"" + EXAMPLE_DESCRIPTOR_RAW + "\"]\'") +
+ HelpExampleCli("scantxoutset", "status") +
+ HelpExampleCli("scantxoutset", "abort") +
+ HelpExampleRpc("scantxoutset", "\"start\", [\"" + EXAMPLE_DESCRIPTOR_RAW + "\"]") +
+ HelpExampleRpc("scantxoutset", "\"status\"") +
+ HelpExampleRpc("scantxoutset", "\"abort\"")
+ },
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR});