Skip to content

Commit 5e5dd99

Browse files
author
MarcoFalke
committed
Merge #17831: rpc: doc: Fix and extend getblockstats examples
7099984 rpc: doc: Fix and extend getblockstats examples (Adam Soltys) Pull request description: This pull fixes the example curl command for `getblockstats` which doesn't work as is because it's missing a comma between the params and has single quotes around the second parameter. It also adds an additional example of getting block stats by hash by using a known workaround (#15412) to get bitcoin-cli to treat the hash parameter as JSON instead of a string since there is ongoing deliberation about how or whether to fix the root issue (#15448). ACKs for top commit: theStack: ACK bitcoin/bitcoin@7099984 Tree-SHA512: 84a5b7f449f06fff785bc0afbc1a7dfd55454bc76c52a8945e91556f87f3edfdc5a1780faab8fcfd6c415b734295b7c67d2e04ba7b6cfa91a77758af5dda53ae
2 parents da4cbb7 + 7099984 commit 5e5dd99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rpc/blockchain.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,10 @@ static UniValue getblockstats(const JSONRPCRequest& request)
17181718
{RPCResult::Type::NUM, "utxo_size_inc", "The increase/decrease in size for the utxo index (not discounting op_return and similar)"},
17191719
}},
17201720
RPCExamples{
1721-
HelpExampleCli("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
1722-
+ HelpExampleRpc("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
1721+
HelpExampleCli("getblockstats", R"('"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]')") +
1722+
HelpExampleCli("getblockstats", R"(1000 '["minfeerate","avgfeerate"]')") +
1723+
HelpExampleRpc("getblockstats", R"("00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"])") +
1724+
HelpExampleRpc("getblockstats", R"(1000, ["minfeerate","avgfeerate"])")
17231725
},
17241726
}.Check(request);
17251727

0 commit comments

Comments
 (0)