Repository navigation
wallet: Rename 'decode' argument in gettransaction method to 'verbose' - #16866
Conversation
This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text.
|
Suggested here: #16185 (comment) Also addresses @MarcoFalke's comment here: #16185 (comment) |
|
I'm assigning this to 0.19 to avoid an API change for the new argument. |
|
Concept ACK. Will review over this weekend. |
|
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. |
meshcollider
left a comment
There was a problem hiding this comment.
Code review ACK 7dee8f4
|
ACK 7dee8f4. |
NeedsAdjustment
left a comment
There was a problem hiding this comment.
I rate these changes 5/5 stars. Keep up the good work developers!
…od to 'verbose' 7dee8f4 [wallet] Rename 'decode' argument in gettransaction method to 'verbose' (John Newbery) Pull request description: This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text. ACKs for top commit: promag: ACK 7dee8f4. meshcollider: Code review ACK 7dee8f4 0xB10C: ACK 7dee8f4: reviewed code Tree-SHA512: a3a62265c8e6e914591f3b3b9f9dd4f42240dc8dab9cbac6ed8d8b8319b6cc847db2ad1689d5440c162e0698f31e39fc6b868ed918b2f62879d61b9865cae66b
There was a problem hiding this comment.
The possible issue here is that the new details section overloads and replaces the pre-existing details in the response, whereas before the decoded section did not remove the details. Seems like a breaking API change unless I'm misunderstanding the intention of this PR.
Will propose a change to address this.
oops. Good catch @jonatack ! That was a clumsy mistake. |
1b41c2c test: improve gettransaction test coverage (Jon Atack) 0f34f54 rpc: fix regression in gettransaction (Jon Atack) Pull request description: Closes #16872. PR #16866 renamed the `decode` argument in gettransaction to `verbose` to make it more consistent with other RPC calls like getrawtransaction. However, it inadvertently overloaded the "details" field when `verbose` is passed. The result is that the original "details" field is no longer returned correctly, which seems to be a breaking API change. This PR: - takes the simplest path to restoring the "details" field by renaming the decoded one back to "decoded" while leaving the `verbose` argument for API consistency, which was the main intent of #16866, - addresses [this comment](#16185 (comment)) by mentioning in the RPC help that the new decoded field is equivalent to decoderawtransaction, and - updates the help, functional test, and release note. Reviewers, to test this manually, build and run `bitcoin-cli help gettransaction` and `bitcoin-cli gettransaction <wallet txid> false true`, and verify that the command returns both `details` and `decoded` fields. ACKs for top commit: jnewbery: tACK 1b41c2c Tree-SHA512: 287edd5db7ed58fe8b548975aba58628bd45ed708b28f40174f10a35a455d89f796fbf27430aa881fc376f47aabda8803f74d4d100683bd86577a02279091cf3
This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text. Github-Pull: bitcoin#16866 Rebased-From: 7dee8f4
…ethod to 'verbose' Summary: [wallet] Rename 'decode' argument in gettransaction method to 'verbose' (John Newbery) Pull request description: This makes the RPC method consistent with other RPC methods that have a 'verbose' option. Change the name of the return object from 'decoded' to details. Update help text. --- Backport of Core [[bitcoin/bitcoin#16866 | PR16866]] and [[bitcoin/bitcoin#16873 | PR16873]] (required to unbreak [[bitcoin/bitcoin#16866 | PR16866]]) Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7378
This makes the RPC method consistent with other RPC methods that have a
'verbose' option.
Change the name of the return object from 'decoded' to details.
Update help text.