test: Fix list index out of range error in feature_bip68_sequence.py #32765

pull zaidmstrr wants to merge 1 commits into bitcoin:master from zaidmstrr:test-feature-bip68-fix changing 1 files +3 −1
  1. zaidmstrr commented at 4:09 PM on June 17, 2025: contributor

    Fixes #32334

    The test feature_bip68_sequence.py fails with IndexError: list index out of range error due to a mismatch between the number of inputs requested (at random) and the number of UTXOs available. The error is reproducible with the randomseed:

    $ ./build/test/functional/feature_bip68_sequence.py --randomseed 6169832640268785903 
    

    This PR adds a valid upper bound to randomly select the inputs.

  2. test: Fix list index out of range error in feature_bip68_sequence.py e285e691b7
  3. DrahtBot commented at 4:09 PM on June 17, 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/32765.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, Prabhat1308, theStack

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. DrahtBot added the label Tests on Jun 17, 2025
  5. Prabhat1308 commented at 5:46 PM on June 17, 2025: contributor

    Approach ACK

    The tests passes even with the original suggestion from the issue here , I wonder why you did not go with that ?

    Although I see no issues with the current approach

    UPD: The test did run noticably slower with the original suggestion

  6. in test/functional/feature_bip68_sequence.py:149 in e285e691b7
     143 | @@ -144,8 +144,10 @@ def test_sequence_lock_confirmed_inputs(self):
     144 |          # between height/time locking). Small random chance of making the locks
     145 |          # all pass.
     146 |          for _ in range(400):
     147 | +            available_utxos = len(utxos)
     148 | +
     149 |              # Randomly choose up to 10 inputs
    


    Prabhat1308 commented at 5:50 PM on June 17, 2025:

    ~This comment should be changed along the line "randomly choose upto minimum of 10 and available_utxo inputs here " now since its also bounded by the size of available_utxos~

    Technically the statement still stands so no need to change


    zaidmstrr commented at 6:01 PM on June 17, 2025:

    Yes, still the maximum bound is 10.

  7. zaidmstrr commented at 6:12 PM on June 17, 2025: contributor

    The tests passes even with the original suggestion from the issue here , I wonder why you did not go with that ?

    The approach suggested here is resource inefficient compared to this. You need to create 4000 UTXOs which is 20x more than the current implementation.

  8. maflcko commented at 6:41 PM on June 17, 2025: member

    lgtm ACK e285e691b7a311e278f89e9fe423716de1ee268b

  9. DrahtBot requested review from Prabhat1308 on Jun 17, 2025
  10. Prabhat1308 commented at 9:25 AM on June 18, 2025: contributor

    re-ACK e285e69

  11. theStack approved
  12. theStack commented at 10:44 PM on June 18, 2025: contributor

    ACK e285e691b7a311e278f89e9fe423716de1ee268b

    Thanks for fixing!

  13. fanquake merged this on Jun 19, 2025
  14. fanquake closed this on Jun 19, 2025

  15. fanquake referenced this in commit 4c7ed36c96 on Jun 19, 2025
  16. fanquake commented at 2:07 PM on June 19, 2025: member

    Backported to 29.x in #32589.

  17. fanquake referenced this in commit 983b268768 on Jun 25, 2025
  18. fanquake referenced this in commit d235d5b77d on Jun 25, 2025
  19. fanquake referenced this in commit 3c56d36bec on Jul 3, 2025
  20. fanquake commented at 4:37 PM on July 3, 2025: member

    Backported to 28.x in #32811.

  21. stringintech referenced this in commit f19e7819e9 on Jul 19, 2025
  22. alexanderwiederin referenced this in commit 9997c3d993 on Jul 25, 2025
  23. alexanderwiederin referenced this in commit 8d6ebb9c4e on Jul 28, 2025
  24. alexanderwiederin referenced this in commit 533a4585b5 on Jul 28, 2025
  25. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  26. bug-castercv502 referenced this in commit d4bd8a1259 on Sep 28, 2025
  27. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  28. tomt1664 referenced this in commit 1ac1f75ec0 on Nov 25, 2025
  29. delta1 referenced this in commit 6664587c2f on Nov 27, 2025
  30. knst referenced this in commit 78a145b697 on Nov 28, 2025
  31. knst referenced this in commit 0abe2523f0 on Nov 29, 2025
  32. knst referenced this in commit 4d3526d562 on Nov 30, 2025
  33. knst referenced this in commit 7fdb1c7164 on Nov 30, 2025
  34. knst referenced this in commit 54734e9c80 on Nov 30, 2025
  35. knst referenced this in commit 50786664dc on Nov 30, 2025
  36. PastaPastaPasta referenced this in commit 566fd2d08d on Dec 2, 2025
  37. morozow referenced this in commit 0d2c75c0f7 on May 8, 2026
  38. morozow referenced this in commit f8c2808c68 on May 8, 2026
  39. morozow referenced this in commit 4509fd25fc on May 8, 2026
  40. morozow referenced this in commit c81a1e776a on May 8, 2026
  41. Kino1994 referenced this in commit 021fd3ff37 on Jun 28, 2026
  42. BigcoinBGC referenced this in commit 54c5700bdb on Jun 30, 2026
  43. bitcoin locked this on Jul 30, 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-11 12:51 UTC

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