-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Move tx creation to create_self_transfer_multi #26414
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
pablomartin4btc
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.
Concept ACK. It looks cleaner and, as you said, simplified, I'll take a deeper look soon.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
hernanmarino
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.
Code Review ACK. At first sight, everything looks fine. @kouloumos did you have a chance to test the output of these functions before / after the change? Something interesting to try would be to verify the output of the previous/current version of each pair of functions, but I didn't have a chance to do it yet.
@hernanmarino I'm not sure if I understood what you are trying to say. The individual tests that are using those functions are working properly, which means that the output is the same. |
At the moment of my comment I had an idea of doing myself some other tests, but now I have a deeper understanding of the changes, and it looks ok. And as you say, if the tests work, there is no reason to do anything else. |
|
ACK 0b78110 👒 Show signatureSignature: |
…ulti 0b78110 test: Move tx creation to create_self_transfer_multi (kouloumos) Pull request description: Two birds with one stone: replacement of bitcoin#26278 with simplification of the MiniWallet's transaction creation logic. Currently the MiniWallet creates simple txns (1 input, 1 output) with `create_self_transfer`. bitcoin#24637 introduced `create_self_transfer_multi` **which uses** `create_self_transfer` to create a "transaction template" which then adjusts (copy and mutate inputs and outputs) in order to create more complex multi-input multi-output transactions. This can more easily lead to issues such as bitcoin#26278 and is more of a maintenance burden. This PR simplifies the logic by going the other way around. Now `create_self_transfer` **uses** `create_self_transfer_multi`. The transaction creation logic has been moved to `create_self_transfer_multi` which is being called by `create_self_transfer` to construct the simple case of 1 input 1 output transaction. ACKs for top commit: MarcoFalke: ACK 0b78110 👒 Tree-SHA512: 147e577ed5444bee57865bd375b37c9b49d6539e9875c30c2667e70fcba27fe80bcb4552a4e6efb42760d34b40d5dad826883b778eaeefe29425ec081787b4bd
Two birds with one stone: replacement of #26278 with simplification of the MiniWallet's transaction creation logic.
Currently the MiniWallet creates simple txns (1 input, 1 output) with
create_self_transfer. #24637 introducedcreate_self_transfer_multiwhich usescreate_self_transferto create a "transaction template" which then adjusts (copy and mutate inputs and outputs) in order to create more complex multi-input multi-output transactions.This can more easily lead to issues such as #26278 and is more of a maintenance burden.
This PR simplifies the logic by going the other way around. Now
create_self_transferusescreate_self_transfer_multi.The transaction creation logic has been moved to
create_self_transfer_multiwhich is being called bycreate_self_transferto construct the simple case of 1 input 1 output transaction.