test: remove unused code in `wallet_fundrawtransaction` #28164

pull brunoerg wants to merge 2 commits into bitcoin:master from brunoerg:2023-07-fix-test-fundrawtransaction changing 1 files +0 −14
  1. brunoerg commented at 7:17 PM on July 26, 2023: contributor

    This PR removes in wallet_fundrawtransaction:

    • unecessary variables/calls to decoderawtransaction
    • unused totalOut variable and its related code (totalOut is used in some functions to test change, in other ones its value is not used)
  2. test: remove unecessary `decoderawtransaction` calls
    In `wallet_fundrawtransaction`, there are some unecessary
    variables/calls to `decoderawtransaction`. They have not
    been used.
    0fc3deee9a
  3. test: remove unused `totalOut` code
    In `wallet_fundrawtransaction`, `totalOut` is used in
    some functions to check if the change is correct. In
    other ones, it has been created but never used.
    108c6255bc
  4. DrahtBot commented at 7:17 PM on July 26, 2023: 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 kevkevinpal, MarcoFalke

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

  5. DrahtBot added the label Tests on Jul 26, 2023
  6. kevkevinpal commented at 8:02 PM on July 26, 2023: contributor

    utACK 108c625

    I'm fine with just removing the unused variables but instead of removing the totalOut and dec_tx would it make sense to add an assertion on what that value is? Not exactly sure why the unused vars were added initially

  7. brunoerg commented at 10:34 PM on July 26, 2023: contributor

    Not exactly sure why the unused vars were added initially

    Not sure if it might worth to add the asserts, it seems to be a leftover from a copy/paste since the functions (in general) are similar.

  8. kevkevinpal commented at 12:29 AM on July 27, 2023: contributor

    Not exactly sure why the unused vars were added initially

    Not sure if it might worth to add the asserts, it seems to be a leftover from a copy/paste since the functions (in general) are similar.

    Ya that makes sense, lgtm

  9. maflcko commented at 6:01 AM on July 27, 2023: member

    lgtm ACK 108c6255bc670bbf2732f2b79f6c32c26e181208

  10. fanquake merged this on Jul 27, 2023
  11. fanquake closed this on Jul 27, 2023

  12. sidhujag referenced this in commit bffbca170d on Aug 9, 2023
  13. bitcoin locked this on Jul 26, 2024

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-05-02 03:13 UTC

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