aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_basic.py
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-02-26 14:04:41 -0800
committerBen Woosley <ben.woosley@gmail.com>2018-03-15 23:43:53 -0700
commit81b0822772169cb697b5994f49398e619d61a12d (patch)
tree5fa33497ba61f9ab4f14be747aed72225149966d /test/functional/wallet_basic.py
parent7be9a9a570c1140048f8781ced1111e1d930e517 (diff)
test: Use wait_until in tests where time was used for polling
Diffstat (limited to 'test/functional/wallet_basic.py')
-rwxr-xr-xtest/functional/wallet_basic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py
index f686cb6ea5..dcd6c54d97 100755
--- a/test/functional/wallet_basic.py
+++ b/test/functional/wallet_basic.py
@@ -379,9 +379,9 @@ class WalletTest(BitcoinTestFramework):
self.start_node(0, [m, "-limitancestorcount="+str(chainlimit)])
self.start_node(1, [m, "-limitancestorcount="+str(chainlimit)])
self.start_node(2, [m, "-limitancestorcount="+str(chainlimit)])
- while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]:
+ if m == '-reindex':
# reindex will leave rpc warm up "early"; Wait for it to finish
- time.sleep(0.1)
+ wait_until(lambda: [block_count] * 3 == [self.nodes[i].getblockcount() for i in range(3)])
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
# Exercise listsinceblock with the last two blocks