test: Use single node in mempool_reorg.py #36663

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2610-test-mempool-reorg changing 1 files +26 −45
  1. maflcko commented at 1:17 PM on October 26, 2026: member

    mempool_reorg.py is a bit confusing:

    • There is a trigger_reorg helper, but it is not used consistently.
    • It tests tx trickle delay on node1, but the global args have immediate tx relay configured for node0.
    • Using two nodes is not needed, in light of Python helpers to create forks and P2P connections.

    So fix all issues by using a single node and the Python helpers.

  2. test: refactor: Use trigger_reorg helper in mempool_reorg.py
    This avoids having to disconnect nodes, and to treat nodes as holding
    chains.
    
    Using the existing create_empty_fork and trigger_reorg is easier.
    fabf5c52cc
  3. test: Use single node in mempool_reorg.py
    The test used two nodes, which is confusing:
    
    * node[0] uses immediate tx relay via noban@127.0.0.1; However, this
      will only apply to incoming connections, not to outgoing ones.
    * The second test requires a peer without immediate tx relay, so it
      would be cleaner to not have any global setting for faster tx relay
      here.
    * Two nodes is not required for testing here. Creating and submitting
      forks, or p2p connections can be done with Python helpers.
    
    Using a single node also allows to remove a bunch of sync and connect
    calls.
    fa329d62c5
  4. test: Extract first test case in mempool_reorg.py
    Also fix inverted comment: "valid" should say "invalid".
    fa3aeb51cf
  5. DrahtBot renamed this:
    test: Use single node in mempool_reorg.py
    test: Use single node in mempool_reorg.py
    on Oct 26, 2026
  6. DrahtBot added the label Tests on Oct 26, 2026
  7. DrahtBot commented at 1:17 PM on October 26, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK jpk68, mercie-ux

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  8. jpk68 commented at 8:34 PM on October 27, 2026: contributor

    ACK fa3aeb51cfb1f664627730ccfded040a16ad2e91

  9. mercie-ux commented at 8:35 AM on October 28, 2026: contributor

    ACK fa3aeb51cfb1f664627730ccfded040a16ad2e91

    The new fork setup gives the same reorg shape as before, with the block containing tx_disconnected replaced by three empty fork blocks. I also confirmed the comment fix, since after the final invalidatedblock, sendrawtransaction(timelock_tx) is rejected as non-final. Removing the whitelist was also necessary, because putting -whitelist=noban@127.0.0.1 back makes peer1 receive 2 invs early and the relay test fails.


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-10-29 06:51 UTC

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