Page MenuHomePhabricator

rpc: doc: Fix and extend getblockstats examples
ClosedPublic

Authored by PiRK on Jan 19 2021, 09:22.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC5f734a013fcb: 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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable