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

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

    Code Coverage & Benchmarks

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

    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.

  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

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

    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.

  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


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: 2025-08-07 06:13 UTC

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