test: fix test_limit_enforcement_package #34001

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2025-12-bugfix_cluster_test changing 1 files +13 −4
  1. instagibbs commented at 6:00 pm on December 3, 2025: member

    The current test has a couple issues:

    1. the parent_tx_good is regenerating the exact same transaction that is already in the cluster, so it’s resulting in no replacements on submission
    2. once fixed, the additional fee needs to be allocated to the parent transaction in the package, not the child. If the RBF fees are allocated to the child, this triggers the package RBF logic, which requires no in-mempool ancestors to be present.

    Fix the bug and add a few assertions to protect against regressions.

  2. test: fix test_limit_enforcement_package
    The current test has a couple issues:
    
    1) the parent_tx_good is regenerating the exact same
    transaction that is already in the cluster, so it's
    resulting in no replacements on submission
    2) once fixed, the additional fee needs to be allocated to
    the parent transaction in the package, not the child. If the
    RBF fees are allocated to the child, this triggers the
    package RBF logic, which requires no in-mempool ancestors to
    be present.
    
    Fix the bug and add a few assertions to protect against
    regressions.
    0a8d303d66
  3. DrahtBot added the label Tests on Dec 3, 2025
  4. DrahtBot commented at 6:00 pm on December 3, 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/34001.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK bensig, achow101, sipa

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • its meant -> it’s meant [missing apostrophe; “its” (possessive) should be “it’s” (it is) to mean “as it is meant to replace”]

    2025-12-03

  5. instagibbs commented at 6:03 pm on December 3, 2025: member
  6. fanquake added this to the milestone 31.0 on Dec 17, 2025
  7. bensig commented at 6:48 pm on January 6, 2026: contributor
    ACK 0a8d303d667cc10a68fd15d799039b9ae26c3315
  8. fanquake requested review from glozow on Feb 13, 2026
  9. achow101 commented at 11:40 pm on February 23, 2026: member
    ACK 0a8d303d667cc10a68fd15d799039b9ae26c3315
  10. sedited requested review from sipa on Feb 25, 2026
  11. in test/functional/mempool_cluster.py:151 in 0a8d303d66
    149+        # This should work because the effect is {max_cluster_count} + 2 - 2 = {max_cluster_count}
    150         third_to_last_utxo = cluster_submitted[-3]["new_utxo"]
    151-        parent_tx_good = self.wallet.create_self_transfer(utxo_to_spend=third_to_last_utxo)
    152-        child_tx_good = self.wallet.create_self_transfer(utxo_to_spend=parent_tx_good["new_utxo"], fee=fee_to_beat * 5)
    153+        # Tweak locktime to not recreate same tx as its meant to replace, fee needs to be even higher
    154+        parent_tx_good = self.wallet.create_self_transfer(utxo_to_spend=third_to_last_utxo, locktime=1, fee=fee_to_beat * 10)
    


    instagibbs commented at 3:46 pm on February 25, 2026:
    I do realize now that technically, increasing the fee should be enough to make sure txid isn’t the same. Still think it’s nice to be very clear.
  12. sipa commented at 3:32 pm on February 26, 2026: member
    ACK 0a8d303d667cc10a68fd15d799039b9ae26c3315
  13. fanquake merged this on Feb 26, 2026
  14. fanquake closed this on Feb 26, 2026


instagibbs DrahtBot bensig achow101 sipa


glozow

Labels
Tests

Milestone
31.0


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-04-02 00:13 UTC

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