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
test: check that combining PSBTs with different txs fails #25670
test: check that combining PSBTs with different txs fails #25670
Conversation
d79d846
to
b4f3322
Compare
Force-pushed a different variant of the first commit (extending the PSBT ctor), avoiding mutable objects as default parameters due to the following linter complaint:
|
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 b4f3322
This will allow to create simple PSBTs as short one-liners, without the need to have three individual assignments (globals, inputs, outputs).
b4f3322
to
16a0b28
Compare
Force-pushed with changes as suggested by @instagibbs (named arguments for PSBT ctor, adding call for success case of combining two identical PSBTs). |
16a0b28
to
4e616d2
Compare
reACK 4e616d2 |
ACK 4e616d2 |
…txs fails 4e616d2 test: check that combining PSBTs with different txs fails (Sebastian Falbesoner) 2a428c7 test: support passing PSBTMaps directly to PSBT ctor (Sebastian Falbesoner) Pull request description: This PR adds missing test coverage for the `combinepsbt` RPC, in the case of combining two PSBTs with different transactions: https://github.com/bitcoin/bitcoin/blob/b8067cd435059eedb580975afc62c4e7a6f27321/src/psbt.cpp#L24-L27 The calling function `CombinePSBTs` checks for the false return value and then returns the transaction error string `PSBT_MISMATCH`: https://github.com/bitcoin/bitcoin/blob/b8067cd435059eedb580975afc62c4e7a6f27321/src/psbt.cpp#L433-L435 https://github.com/bitcoin/bitcoin/blob/b8067cd435059eedb580975afc62c4e7a6f27321/src/util/error.cpp#L30-L31 ACKs for top commit: instagibbs: reACK bitcoin@4e616d2 achow101: ACK 4e616d2 Tree-SHA512: 45b2b224b13b44ad69ae62e4bc20f74cab32770cf8127b026ec47a7520f7253148fdbf1fad612afece59e45a6738bef9a351ae87ea98dc83d095cc78f6db0318
This PR adds missing test coverage for the
combinepsbt
RPC, in the case of combining two PSBTs with different transactions:bitcoin/src/psbt.cpp
Lines 24 to 27 in b8067cd
The calling function
CombinePSBTs
checks for the false return value and then returns the transaction error stringPSBT_MISMATCH
:bitcoin/src/psbt.cpp
Lines 433 to 435 in b8067cd
bitcoin/src/util/error.cpp
Lines 30 to 31 in b8067cd