diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-04 20:06:38 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-05 14:37:46 -0400 |
commit | fa3f9a05660687bf4146e089050e944a1d6cbe3c (patch) | |
tree | 36f1337187c072c11244547806832ab73ba1721e /test/functional/wallet_basic.py | |
parent | e727c2bdcab3660297f452c76c6f877038015c02 (diff) | |
download | bitcoin-fa3f9a05660687bf4146e089050e944a1d6cbe3c.tar.xz |
test: Fix intermittent sync_blocks failures
Diffstat (limited to 'test/functional/wallet_basic.py')
-rwxr-xr-x | test/functional/wallet_basic.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 2dddbf2cf3..9e295af330 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -4,7 +4,6 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet.""" from decimal import Decimal -import time from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( @@ -466,12 +465,8 @@ class WalletTest(BitcoinTestFramework): extra_args = ["-walletrejectlongchains", "-limitancestorcount=" + str(2 * chainlimit)] self.start_node(0, extra_args=extra_args) - # wait for loadmempool - timeout = 10 - while (timeout > 0 and len(self.nodes[0].getrawmempool()) < chainlimit * 2): - time.sleep(0.5) - timeout -= 0.5 - assert_equal(len(self.nodes[0].getrawmempool()), chainlimit * 2) + # wait until the wallet has submitted all transactions to the mempool + wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2) node0_balance = self.nodes[0].getbalance() # With walletrejectlongchains we will not create the tx and store it in our wallet. |