rpc: doc: Fix and extend getblockstats examples#17831
Merged
maflcko merged 1 commit intobitcoin:masterfrom Apr 20, 2020
Merged
Conversation
eb3672a to
1078183
Compare
andrewtoth
reviewed
Dec 30, 2019
39b2bbc to
687818c
Compare
theStack
suggested changes
Mar 20, 2020
Contributor
theStack
left a comment
There was a problem hiding this comment.
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
Contributor
Author
|
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
approved these changes
Apr 18, 2020
Fabcien
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Jan 19, 2021
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
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Dec 28, 2021
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).