mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 14:34:13 +02:00
test: Use wait_until in tests where time was used for polling
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user