mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 20:11:35 +02:00
test: fix another intermittent failure in wallet_basic.py
During init, the test framework will start using rpc after the
mempool was loaded. It will not wait for postInitProcess or
outstanding transactionAddedToMempool notifications, leading to
a possible race, in which listunspent is being called while the
tx is still in Inactive status. Prevent this by processing
outstanding notifications.
Github-Pull: #32483
Rebased-From: e7ad86e1ca
This commit is contained in:
committed by
fanquake
parent
c966158426
commit
cf034172bf
@@ -779,6 +779,9 @@ class WalletTest(BitcoinTestFramework):
|
||||
|
||||
# check that it works again with -spendzeroconfchange set (=default)
|
||||
self.restart_node(0, ["-spendzeroconfchange=1"])
|
||||
# Make sure the wallet knows the tx in the mempool
|
||||
self.nodes[0].syncwithvalidationinterfacequeue()
|
||||
|
||||
zeroconf_wallet = self.nodes[0].get_wallet_rpc("zeroconf")
|
||||
utxos = zeroconf_wallet.listunspent(minconf=0)
|
||||
assert_equal(len(utxos), 1)
|
||||
|
Reference in New Issue
Block a user