HomePhabricator

rpc: doc: Fix and extend getblockstats examples

Description

rpc: doc: Fix and extend getblockstats examples

Summary:

This fixes the example curl command for getblockstats which is missing
a comma between the params and has single quotes around the second
parameter.

Besides fixing the existing example, this commit adds an additional
example of getting block stats by hash by using a known workaround with
bitcoin-cli to get it to treat the hash parameter as a JSON string by
wrapping it in both single and double quotes.

Co-Authored-By: Andrew Toth <andrewstoth@gmail.com>
Co-Authored-By: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>

This is a backport of Core PR17831

Test Plan:
src/bitcoin-cli help getblockstats

Then run the new example commands to make sure they work.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8952

Details

Provenance
Adam Soltys <asoltys@gmail.com>Authored on Jan 19 2021, 14:23
PiRKCommitted on Jan 19 2021, 14:30
abc-botPushed on Jan 19 2021, 14:30
Reviewer
Restricted Project
Differential Revision
D8952: rpc: doc: Fix and extend getblockstats examples
Parents
rABC9cbbaa71632b: scripted-diff: Rename PRUNED to SPENT in coins tests
Branches
Unknown
Tags
Unknown