test: Fix intermittent feature_rbf issue #26941

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2301-test-rbf-int-issue-🍻 changing 1 files +2 −2
  1. maflcko commented at 10:20 AM on January 21, 2023: member

    The miniwallet will rescan the chain and mempool on construction. If the mempools are still in sync, it may lead to crashes. Fix that by moving the sync first.

    Fixes #26937

  2. test: Fix intermittent feature_rbf issue fa88c043d1
  3. DrahtBot commented at 10:20 AM on January 21, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK theStack

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

  4. DrahtBot added the label Tests on Jan 21, 2023
  5. maflcko added this to the milestone 25.0 on Jan 21, 2023
  6. theStack approved
  7. theStack commented at 4:26 PM on January 21, 2023: contributor

    Code-review ACK fa88c043d19f15a8716c11102b0db3c68501db28

    FWIW, I think another alternative would be to simply avoid scanning the mempool in the MiniWallet ctor:

    index f3253630c4..91c870a859 100644
    --- a/test/functional/test_framework/wallet.py
    +++ b/test/functional/test_framework/wallet.py
    @@ -106,7 +106,7 @@ class MiniWallet:
             # (see method BitcoinTestFramework._initialize_chain())
             # The MiniWallet needs to rescan_utxos() in order to account
             # for those mature UTXOs, so that all txs spend confirmed coins
    -        self.rescan_utxos()
    +        self.rescan_utxos(include_mempool=False)
    
         def _create_utxo(self, *, txid, vout, value, height, coinbase, confirmations):
             return {"txid": txid, "vout": vout, "value": value, "height": height, "coinbase": coinbase, "confirmations": confirmations}
    
  8. maflcko commented at 4:50 PM on January 21, 2023: member

    FWIW, I think another alternative would be to simply avoid scanning the mempool in the MiniWallet ctor:

    If this is done, it might be good to use kwargs to pass through the option and set it in the rbf test. I opted for my solution, because rescanning after the block is mined has the minor benefit that miniwallet's utxos have the right height/confirmations set

  9. fanquake merged this on Jan 22, 2023
  10. fanquake closed this on Jan 22, 2023

  11. maflcko deleted the branch on Jan 23, 2023
  12. sidhujag referenced this in commit 26b0d95e57 on Jan 23, 2023
  13. bitcoin locked this on Jan 23, 2024

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-24 09:14 UTC

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