Merge bitcoin/bitcoin#26941: test: Fix intermittent feature_rbf issue

fa88c043d1 test: Fix intermittent feature_rbf issue (MarcoFalke)

Pull request description:

  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

ACKs for top commit:
  theStack:
    Code-review ACK fa88c043d1

Tree-SHA512: 5ffcd5e91118b57811b62f12454da8ae3ca98ffad175cd895cd41b63d7cf420906b1e15a4d4489d223d6b21ab796f9839676af8a5f340c606868bc249f4ea340
pull/26944/head
fanquake 2 years ago
commit bf9361d375
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -392,11 +392,11 @@ class ReplaceByFeeTest(BitcoinTestFramework):
enough transactions off of each root UTXO to exceed the MAX_REPLACEMENT_LIMIT.
Then create a conflicting RBF replacement transaction.
"""
normal_node = self.nodes[1]
wallet = MiniWallet(normal_node)
# Clear mempools to avoid cross-node sync failure.
for node in self.nodes:
self.generate(node, 1)
normal_node = self.nodes[1]
wallet = MiniWallet(normal_node)
# This has to be chosen so that the total number of transactions can exceed
# MAX_REPLACEMENT_LIMIT without having any one tx graph run into the descendant

Loading…
Cancel
Save