-
Notifications
You must be signed in to change notification settings - Fork 37.7k
rpc: Add RPC help for getblock verbosity level 3 #23320
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
rpc: Add RPC help for getblock verbosity level 3 #23320
Conversation
* fix English in release notes * Simplify `switch` to `if`.
2716380
to
08d129a
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK |
Any specific reason for closing? |
@laanwj No, that was just a mistake as I was deleting old branches and this one was deleted by mistake too. Sorry. |
@kiminuo No problem! Will take a look it seems very close to ready to merge. |
Code review and lightly tested ACK 08d129a |
08d129a
to
3a6a670
Compare
|
@pg156: You have to build and run |
Thank you @theStack! I get "verbosity = 3" after building |
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.
Does this line also need to be updated for verbosity = 3?
bitcoin/src/rpc/blockchain.cpp
Line 946 in 1bdd5f6
{"verbosity|verbose", RPCArg::Type::NUM, RPCArg::Default{1}, "0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data"}, |
3a6a670
to
059f88b
Compare
@pg156 It's certainly better to update it. Updated. Thank you. Ideas about better wordings are welcome :) |
Code review ACK 3a6a670.
self.log.info(node.getblock(blockhash, 2))
self.log.info(node.getblock(blockhash, 3)) The difference is: 'prevout': {'generated': True, 'height': 18, 'value': Decimal('50.00000000'), 'scriptPubKey': {'asm': '0 4ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260', 'hex': '00204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc33260', 'address': 'bcrt1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqseac85', 'type': 'witness_v0_scripthash'}}
./src/bitcoind -testnet -daemon
./src/bitcoin-cli -testnet help getblock which generates: ...
Result (for verbosity = 3):
{ (json object)
..., Same output as verbosity = 2
"tx" : [ (json array)
{ (json object)
"vin" : [ (json array)
{ (json object)
..., The same output as verbosity = 2
"prevout" : { (json object) (Only if undo information is available)
"generated" : true|false, (boolean) Coinbase or not
"height" : n, (numeric) The height of the prevout
"value" : n, (numeric) The value in BTC
"scriptPubKey" : { (json object)
"asm" : "str", (string) The asm
"hex" : "str", (string) The hex
"address" : "str", (string, optional) The Bitcoin address (only if a well-defined address exists)
"type" : "str" (string) The type, eg 'pubkeyhash'
}
}
},
...
]
},
...
]
} |
Typically one ACKs the last commit from https://github.com/bitcoin/bitcoin/pull/23320/commits page because that's the current version of the PR. You can also possibly ACK a commit from previous git (force) push to say something like "I really like the previous changeset as opposed to the current changeset" but that would be rare AFAIK. Thank you for the review! |
Github-Pull: bitcoin#23320 Rebased-From: 08d129a
@pg156 Could you please re-review? |
ACK 059f88b |
re-ACK 059f88b |
059f88b Add RPC help for getblock verbosity level 3 (Kiminuo) 1bdd5f6 Address review comments from bitcoin#22918 (Kiminuo) Pull request description: This is a follow-up PR to bitcoin#22918 which addresses review comments (first commit). The second commit adds missing RPC help for verbosity level 3. ACKs for top commit: pg156: ACK bitcoin@059f88b laanwj: re-ACK 059f88b Tree-SHA512: f27d53ac34b93a304ef5668701ed2b5c986a926bc8ad0df4de89695fc9e1df26acb008611451319ea897658acd9c56c6a0555d60359960c9cd28238ebefa2d50
…ioning output types c821ab8 Use `GetAllOutputTypes` in `getblock` RPC function (Kiminuo) d970a85 Move `GetAllOutputTypes` function from `rpc/rawtransaction.cpp` to `rpc/util.{h|cpp}` (Kiminuo) Pull request description: This PR attempts to replicate https://github.com/bitcoin/bitcoin/blob/0ccf9b2e5594581deef2f60174c3651a57f93b64/src/rpc/rawtransaction.cpp#L547 to one other place (at the moment) so that users have better idea what RPC methods can actually return. I created this PR as a follow-up to the idea mentioned here bitcoin/bitcoin#23320 (comment) (resolved). ACKs for top commit: kristapsk: re-ACK c821ab8 Tree-SHA512: 5ff66a41ad7c43ec769f4a99933d2d070feea7c617286d94b6f9bfa1a2547a42211915778210a89074ad4b14d99f34852cc6871efed5e6f1e2ffedd40d669386
This is a follow-up PR to #22918 which addresses review comments (first commit). The second commit adds missing RPC help for verbosity level 3.