test: fix anti-fee-sniping off-by-one error #33118

pull ishaanam wants to merge 1 commits into bitcoin:master from ishaanam:sendall_locktime_off_by_one_fix changing 2 files +8 −2
  1. ishaanam commented at 7:40 PM on August 1, 2025: contributor

    This fixes the off-by-one error in the anti-fee-sniping tests for send and sendall. assert_greater_than fails if the two values are equal.

    Closes #33114

  2. DrahtBot added the label Tests on Aug 1, 2025
  3. DrahtBot commented at 7:40 PM on August 1, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33118.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK achow101, glozow

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. in test/functional/wallet_send.py:152 in dc85bba173 outdated
     148 | @@ -149,7 +149,9 @@ def test_send(self, from_wallet, to_wallet=None, amount=None, data=None,
     149 |          else:
     150 |              if add_to_wallet:
     151 |                  decoded_tx = from_wallet.gettransaction(txid=res["txid"], verbose=True)["decoded"]
     152 | -                assert_greater_than(decoded_tx["locktime"], from_wallet.getblockcount() - 100)
     153 | +                # the locktime should be within 100 blocks of the 
    


    glozow commented at 7:45 PM on August 1, 2025:

    Trailing whitespace


    ishaanam commented at 7:50 PM on August 1, 2025:

    Fixed

  5. glozow commented at 7:45 PM on August 1, 2025: member

    You could also assert_greater_than_or_equal?

  6. test: fix anti-fee-sniping off-by-one error e07e2532b4
  7. ishaanam force-pushed on Aug 1, 2025
  8. DrahtBot added the label CI failed on Aug 1, 2025
  9. DrahtBot commented at 7:50 PM on August 1, 2025: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/runs/47228227670</sub> <sub>LLM reason (✨ experimental): Lint errors due to trailing whitespace caused the CI failure.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  10. achow101 commented at 10:49 PM on August 1, 2025: member

    ACK e07e2532b4d7b4a549722e56cb2913a6081ccbaf

  11. DrahtBot removed the label CI failed on Aug 1, 2025
  12. glozow commented at 8:10 PM on August 2, 2025: member

    utACK e07e2532b4d7b4a549722e56cb2913a6081ccbaf

  13. fanquake merged this on Aug 3, 2025
  14. fanquake closed this on Aug 3, 2025

  15. sedited referenced this in commit b98d982d79 on Aug 7, 2025
  16. stringintech referenced this in commit 71275a1b5e on Aug 17, 2025
  17. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  18. bug-castercv502 referenced this in commit 4aa5572aea on Sep 28, 2025
  19. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  20. luke-jr referenced this in commit 79afe1f616 on Apr 13, 2026
  21. Kino1994 referenced this in commit ee9c526fb4 on Jun 28, 2026
  22. BigcoinBGC referenced this in commit 36107f67c2 on Jun 30, 2026
  23. bitcoin locked this on Aug 3, 2026

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-08-22 00:51 UTC

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