test: use ForkGenerator to deduplicate reorg test code #33959

pull yuvicc wants to merge 2 commits into bitcoin:master from yuvicc:2025-11-followup_fix_reorgs_tests changing 14 files +218 −135
  1. yuvicc commented at 5:49 AM on November 27, 2025: contributor

    Deduplicate reorg test code by introducing ForkGenerator utility class in blocktools.py. This pr is a follow-up to #32587.

    Changes

    • Add ForkGenerator class with prepare_fork() / trigger_reorg() / reset() methods
    • Removes duplicated trigger_reorg() methods across tests
    • I have reviewed all the functional tests (wallet, p2p, feature, etc), only a handful could be refactored to fork based approach for reorg testing.
  2. DrahtBot added the label Tests on Nov 27, 2025
  3. DrahtBot commented at 5:49 AM on November 27, 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/33959.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. fanquake requested review from instagibbs on Nov 27, 2025
  5. fanquake renamed this:
    test: use ForkGenerator to deduplicate reorg test code (#32587 follow-up)
    test: use ForkGenerator to deduplicate reorg test code
    on Nov 27, 2025
  6. yuvicc force-pushed on Dec 13, 2025
  7. DrahtBot added the label Needs rebase on Feb 25, 2026
  8. maflcko commented at 2:05 PM on May 21, 2026: member

    are you still working on this, or can it be closed?

  9. yuvicc commented at 11:50 AM on May 22, 2026: contributor

    are you still working on this, or can it be closed?

    Yes resumed the work, will push the update soon!

  10. test: use ForkGenerator to deduplicate reorg test code
    Replace duplicated trigger_reorg() methods in mempool tests with ForkGenerator utility class in blocktools.py.
    2441aee94c
  11. yuvicc force-pushed on Jun 12, 2026
  12. DrahtBot removed the label Needs rebase on Jun 12, 2026
  13. DrahtBot added the label CI failed on Jun 12, 2026
  14. DrahtBot removed the label CI failed on Jun 12, 2026
  15. fix: reorg behaviour in wallet, p2p and rpc functional tests to use proper fork-based approach 59476869d2
  16. yuvicc force-pushed on Jun 12, 2026
  17. yuvicc marked this as ready for review on Jun 12, 2026
  18. yuvicc commented at 12:24 PM on June 12, 2026: contributor

    Updated the PR description and ready for review


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-07-02 02:51 UTC

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