Skip to content

Commit 07350e2

Browse files
committed
test: Fix intermittent failure in wallet_basic.py
There could be a race with outstanding TxAddedToMempool notifications being applied to the soon-to-be created wallet. Fixes an intermittent timeout reproducable by adding a sleep to AddToWallet.
1 parent 3edf400 commit 07350e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/functional/wallet_basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,8 @@ def run_test(self):
603603
txid_a = self.nodes[0].sendtoaddress(addr_a, 0.01)
604604
txid_b = self.nodes[0].sendtoaddress(addr_b, 0.01)
605605
self.generate(self.nodes[0], 1, sync_fun=self.no_op)
606+
# Prevent race of listunspent with outstanding TxAddedToMempool notifications
607+
self.nodes[0].syncwithvalidationinterfacequeue()
606608
# Now import the descriptors, make sure we can identify on which descriptor each coin was received.
607609
self.nodes[0].createwallet(wallet_name="wo", descriptors=True, disable_private_keys=True)
608610
wo_wallet = self.nodes[0].get_wallet_rpc("wo")

0 commit comments

Comments
 (0)