-
Notifications
You must be signed in to change notification settings - Fork 38.8k
rpc: doc: Fix and extend getblockstats examples #17831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
eb3672a to
1078183
Compare
39b2bbc to
687818c
Compare
theStack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight problem with superfluous quotation marks (probably happened with the usage of raw strings), see my code review comments plus change suggestions.
Apart from that, LGTM: tested that the new example of getting block stats by hash works fine (both for CLI and RPC) and that the fix approach for the curl example of getting block stats by height is right. 👍
687818c to
9ea572e
Compare
|
I think this is ready for merging now. Requesting review @jonasschnelli @MarcoFalke |
9ea572e to
770c5cb
Compare
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 <[email protected]> Co-Authored-By: Sebastian Falbesoner <[email protected]>
770c5cb to
7099984
Compare
theStack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7099984
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 <[email protected]> > Co-Authored-By: Sebastian Falbesoner <[email protected]> This is a backport of Core [[bitcoin/bitcoin#17831 | 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
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 (bitcoin#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 (bitcoin#15448). ACKs for top commit: theStack: ACK bitcoin@7099984 Tree-SHA512: 84a5b7f449f06fff785bc0afbc1a7dfd55454bc76c52a8945e91556f87f3edfdc5a1780faab8fcfd6c415b734295b7c67d2e04ba7b6cfa91a77758af5dda53ae
This pull fixes the example curl command for
getblockstatswhich 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).