-
Notifications
You must be signed in to change notification settings - Fork 38.7k
rpc: Document iswitness flag and fix bug in converttopsbt #15899
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
fab96c9 to
fa8630d
Compare
|
review beg 🙏 @meshcollider As the author of the docstring, you seem qualified to review the doc change? |
|
utACK fa8630d268dc65e097ead9962d9d8af2301182ca |
ryanofsky
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.
utACK fa8630d268dc65e097ead9962d9d8af2301182ca
src/rpc/rawtransaction.cpp
Outdated
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.
In commit "rpc: Document iswitness flag" (faee652f971e5422c4df1dff3f36c9089aaf587f)
Maybe drop this sentence and just use the same "If not present, If true..., If false..." text from converttopsbt. I think the converttopsbt explanation is a little clearer, and that it's better to keep the text consistent in all three methods so readers don't have to parse text closely to see where differences are.
Sipa's explanation and advice from the bug also seem very helpful and so might be worth incorporating too:
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.
Force pushed to use the same docstring everywhere
fa5a72d to
faa568a
Compare
Also explain the param in all RPCs
faa568a to
fa499b5
Compare
ryanofsky
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.
utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods.
PastaPastaPasta
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.
utACK fa499b5
|
Anything left to do here? |
|
utACK fa499b5 |
fa499b5 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke) fa5c5cd rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke) Pull request description: When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways: * Fixes #12989 * Fixes #15872 * Fixes #15701 * Fixes #13738 * ... When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data) ACKs for commit fa499b: meshcollider: utACK fa499b5 ryanofsky: utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods. PastaPastaPasta: utACK fa499b5 Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
Github-Pull: bitcoin#15899 Rebased-From: fa5c5cd
Also explain the param in all RPCs Github-Pull: bitcoin#15899 Rebased-From: fa499b5
…erttopsbt fa499b5 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke) fa5c5cd rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke) Pull request description: When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways: * Fixes bitcoin#12989 * Fixes bitcoin#15872 * Fixes bitcoin#15701 * Fixes bitcoin#13738 * ... When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data) ACKs for commit fa499b: meshcollider: utACK bitcoin@fa499b5 ryanofsky: utACK fa499b5. Changes since last review: consolidating commits and making iswitness documentation the same across methods. PastaPastaPasta: utACK fa499b5 Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
Github-Pull: bitcoin#15899 Rebased-From: fa5c5cd
Also explain the param in all RPCs Github-Pull: bitcoin#15899 Rebased-From: fa499b5
Github-Pull: bitcoin#15899 Rebased-From: fa5c5cd
Also explain the param in all RPCs Github-Pull: bitcoin#15899 Rebased-From: fa499b5
When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways:
When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data)