diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index f32d835481..8f9515f97f 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -486,6 +486,9 @@ class WalletTest(BitcoinTestFramework): timeout -= 0.5 assert_equal(len(self.nodes[0].getrawmempool()), chainlimit * 2) + # Prevent potential race condition when calling wallet RPCs right after restart + self.nodes[0].syncwithvalidationinterfacequeue() + node0_balance = self.nodes[0].getbalance() # With walletrejectlongchains we will not create the tx and store it in our wallet. assert_raises_rpc_error(-4, "Transaction has too long of a mempool chain", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))