Skip to content

Commit a582ee6

Browse files
committed
Merge bitcoin/bitcoin#29982: test: Fix intermittent issue in wallet_backwards_compatibility.py
ec77791 test: Fix intermittent issue in wallet_backwards_compatibility.py (Randall Naar) Pull request description: When creating and replacing a transaction using `bumpfee`, an async update is sent in the form of the `TransactionAddedToMempool` and `TransactionRemovedFromMempool` signals. When `wallet_backwards_compatibility.py` creates `tx3_id` this way and replaces it with `tx4_id`, the `abandontransaction` rpc is called right after. In some cases the `TransactionAddedToMempool` and `TransactionRemovedFromMempool` is handled after the transaction is abandoned in the wallet, and overwrites the transaction's `abandoned` flag. This PR forces the signals to get handled before `abandontransaction` is called by invoking `self.sync_mempools` which calls `syncwithvalidationinterfacequeue` on every node's rpc connection. This will mitigate the immediate inconsistency observed with the abandontransaction call, but the potential race conditions between the signals and wallet operations may also be useful to note in a separate issue (if it's okay to not address it in this one). Fixes #29806 ACKs for top commit: achow101: ACK ec77791 tdb3: ACK ec77791 Tree-SHA512: e75bc2c1f7fefc4f4910bb353654848fed5661c1436416798a5f4e0c5a76bde15617a5af04c2384464005953326317b8f273039e47508d5124677908cf36d31e
2 parents 37e49c2 + ec77791 commit a582ee6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/wallet_backwards_compatibility.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def run_test(self):
169169
# Create another conflicting transaction using RBF
170170
tx3_id = node_master.sendtoaddress(return_address, 1)
171171
tx4_id = node_master.bumpfee(tx3_id)["txid"]
172+
self.sync_mempools()
172173
# Abandon transaction, but don't confirm
173174
node_master.abandontransaction(tx3_id)
174175

0 commit comments

Comments
 (0)