test: Fix flaky wallet_basic test
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
This commit is contained in:
1 parent
23d3ae7acc
commit
56b018ca7f
1 file changed
+3
@@ -596,6 +596,9 @@ class WalletTest(BitcoinTestFramework):
|
|||||||
# wait until the wallet has submitted all transactions to the mempool
|
# wait until the wallet has submitted all transactions to the mempool
|
||||||
self.wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
|
self.wait_until(lambda: 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()
|
node0_balance = self.nodes[0].getbalance()
|
||||||
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
# With walletrejectlongchains we will not create the tx and store it in our wallet.
|
||||||
assert_raises_rpc_error(-6, "Transaction has too long of a mempool chain", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))
|
assert_raises_rpc_error(-6, "Transaction has too long of a mempool chain", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))
|
||||||
|
|||||||
Reference in new issue
Block a user