test: Move tx creation to create_self_transfer_multi #26414

pull kouloumos wants to merge 1 commits into bitcoin:master from kouloumos:modify-create_self_transfer changing 1 files +28 −41
  1. kouloumos commented at 2:11 PM on October 28, 2022: contributor

    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 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 #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.

  2. test: Move tx creation to create_self_transfer_multi 0b78110f73
  3. fanquake added the label Tests on Oct 28, 2022
  4. pablomartin4btc commented at 10:08 PM on November 2, 2022: member

    Concept ACK. It looks cleaner and, as you said, simplified, I'll take a deeper look soon.

  5. DrahtBot commented at 12:06 PM on November 4, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK MarcoFalke
    Concept ACK pablomartin4btc, hernanmarino

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26625 (test: Run mempool_packages.py with MiniWallet by MarcoFalke)
    • #25038 (policy: nVersion=3 and Package RBF by glozow)
    • #20892 (tests: Run both descriptor and legacy tests within a single test invocation by achow101)

    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.

  6. hernanmarino commented at 7:44 PM on November 4, 2022: contributor

    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.

  7. kouloumos commented at 6:07 PM on November 21, 2022: contributor

    [...] 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.

  8. hernanmarino commented at 6:38 PM on November 21, 2022: contributor

    @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.

  9. maflcko commented at 3:22 PM on December 5, 2022: member

    ACK 0b78110f73965fd827748107e0f3497d3352be71 👒

    <details><summary>Show signature</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK 0b78110f73965fd827748107e0f3497d3352be71 👒
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUirYgwApWdVLOaxuKSKsdyD9mTANyuO+LITvJde9SVxsClw+1A5pLfakqmHlFyL
    fJpPCSdZuy4Qxm3lbDIIsPepSS6JV6EJXMhdfHNArFU/gF4R0zgaOSvd3jH/qCJL
    Uq9ux5tU3N3H3RHhCIafeqxgY/1re9cGKAPY2/BvUJv6u+mcNd8AG5LjYcpwAk0z
    /SVS/uE6bDecpOQrHNAmUK2sUcEHmwEyFAEmxo5bjtN2+qMQCiZQxKbM34WXATdO
    p3ABPNx2k16MUcwWmEJKe7jL9Azy+MDaQhCVdrpB6DvO9LNHXuiOA3/b5Ua+2R1h
    37CkjJ0ClIaFI55jqu4MbHzsjKnOALYefddvDNjWLdzIogjL7SlM4sTp9hLx0rfL
    Lz93MZ0VqbFb/QjtBae85Vb4nTTkW3CLXBvMivMYR129gzv1xrkV5gbx9YV+VSvv
    YyjTyyCOu2RDh1xRSnJ2v1RR1xTLLcTn703LBYCsjufdtrPVeiCMDNy5QtU4Fg+J
    Z4WXlfTE
    =ksp3
    -----END PGP SIGNATURE-----
    

    </details>

  10. maflcko merged this on Dec 5, 2022
  11. maflcko closed this on Dec 5, 2022

  12. kouloumos deleted the branch on Dec 5, 2022
  13. sidhujag referenced this in commit 59b077f4e5 on Dec 5, 2022
  14. bitcoin locked this on Dec 5, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me