mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-23 23:12:20 +02:00
Merge #17831: rpc: doc: Fix and extend getblockstats examples
709998467e1c1bc7980662c9f88fbc7964602d33 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 709998467e
Tree-SHA512: 84a5b7f449f06fff785bc0afbc1a7dfd55454bc76c52a8945e91556f87f3edfdc5a1780faab8fcfd6c415b734295b7c67d2e04ba7b6cfa91a77758af5dda53ae
This commit is contained in:
commit
5e5dd9918e
@ -1718,8 +1718,10 @@ static UniValue getblockstats(const JSONRPCRequest& request)
|
||||
{RPCResult::Type::NUM, "utxo_size_inc", "The increase/decrease in size for the utxo index (not discounting op_return and similar)"},
|
||||
}},
|
||||
RPCExamples{
|
||||
HelpExampleCli("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
|
||||
+ HelpExampleRpc("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
|
||||
HelpExampleCli("getblockstats", R"('"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]')") +
|
||||
HelpExampleCli("getblockstats", R"(1000 '["minfeerate","avgfeerate"]')") +
|
||||
HelpExampleRpc("getblockstats", R"("00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"])") +
|
||||
HelpExampleRpc("getblockstats", R"(1000, ["minfeerate","avgfeerate"])")
|
||||
},
|
||||
}.Check(request);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user