test: wallet: add coverage for `-spendzeroconfchange` setting #26884

pull theStack wants to merge 2 commits into bitcoin:master from theStack:202301-test-add_nospendzeroconfchange_coverage changing 2 files +39 −1
  1. theStack commented at 3:13 AM on January 13, 2023: contributor

    This PR adds missing test coverage for the -spendzeroconfchange setting (in particular the non-default case =0). Note that in contrast to the name, the setting does not only apply to change outputs, but in fact to all unconfirmed outputs that we sent to ourselves, i.e. we can trigger the testing path simply with a single recipient address. The first commit removes the setting from the functional test mempool_limit.py, where it doesn't have any effect, since the test was changed to use MiniWallet in commit dddca3899c4738e512313a85aeb006310e34e31f.

  2. test: remove `-spendzeroconfchange` setting from mempool_limit.py
    Since this test was changed to use MiniWallet instead of the Bitcoin
    Core wallet (see commit d447ded6babebe7c7948e585c9e78bf34dbef226),
    the setting doesn't have any effect and hence can be removed.
    50112034bc
  3. DrahtBot commented at 3:13 AM on January 13, 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 brunoerg

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

  4. DrahtBot added the label Tests on Jan 13, 2023
  5. brunoerg commented at 2:51 PM on January 13, 2023: contributor

    Concept ACK

  6. brunoerg commented at 2:58 PM on January 13, 2023: contributor

    I think we could also test the behavior of getbalance with spendzeroconfchange.

  7. test: wallet: add coverage for `-spendzeroconfchange` setting 603d295199
  8. theStack force-pushed on Jan 13, 2023
  9. theStack commented at 8:59 PM on January 13, 2023: contributor

    I think we could also test the behavior of getbalance with spendzeroconfchange.

    Good idea, done. Used getbalances rather than getbalance to check in which category unconfirmed self-sent coins fall (trusted or untrusted_pending) depending on the -spendzeroconfchange setting.

  10. brunoerg approved
  11. brunoerg commented at 4:41 PM on January 16, 2023: contributor

    crACK 603d29519931e6ab6a58db09b9d3eb9b355fe566

    Nice!

  12. maflcko merged this on Jan 17, 2023
  13. maflcko closed this on Jan 17, 2023

  14. theStack deleted the branch on Jan 17, 2023
  15. sidhujag referenced this in commit 6782c9b317 on Jan 17, 2023
  16. bitcoin locked this on Jan 17, 2024
Labels

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-14 21:13 UTC

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