diff options
| author | Fabian Jahr <[email protected]> | 2020-09-05 19:55:37 +0200 |
|---|---|---|
| committer | Fabian Jahr <[email protected]> | 2020-09-05 19:55:59 +0200 |
| commit | 56b018ca7f37d25041b74f1bec305bdf54a55b9b (patch) | |
| tree | 9f16c5cc26beb32b142c092c303af612f07cdfb6 | |
| parent | Merge #19405: rpc, cli: add network in/out connections to `getnetworkinfo` an... (diff) | |
| download | discoin-56b018ca7f37d25041b74f1bec305bdf54a55b9b.tar.xz discoin-56b018ca7f37d25041b74f1bec305bdf54a55b9b.zip | |
test: Fix flaky wallet_basic test
Co-authored-by: João Barbosa <[email protected]>
| -rwxr-xr-x | test/functional/wallet_basic.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 147c43f2f..bb208341a 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -596,6 +596,9 @@ class WalletTest(BitcoinTestFramework): # wait until the wallet has submitted all transactions to the mempool 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() # 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')) |