aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-03-29 09:32:52 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-03-29 09:33:02 +0200
commit26794d4645e461dd66d8e1e532e78e9ad5266310 (patch)
treee91aecf7ae0ade70a5cafdd05174310ed5f0cb34
parent84370d58ffc6d5ea22efa0e579dea00f860ad369 (diff)
parentfa3fafc96076afb15fa77e01d5f6aff88a333a7e (diff)
Merge #7757: [qa] wallet: Wait for reindex to catch up
fa3fafc [qa] wallet: Wait for reindex to catch up (MarcoFalke)
-rwxr-xr-xqa/rpc-tests/wallet.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
index df176601a5..e6ce397119 100755
--- a/qa/rpc-tests/wallet.py
+++ b/qa/rpc-tests/wallet.py
@@ -279,6 +279,7 @@ class WalletTest (BitcoinTestFramework):
blocks = self.nodes[0].generate(2)
self.sync_all()
balance_nodes = [self.nodes[i].getbalance() for i in range(3)]
+ block_count = self.nodes[0].getblockcount()
maintenance = [
'-rescan',
@@ -292,6 +293,9 @@ class WalletTest (BitcoinTestFramework):
stop_nodes(self.nodes)
wait_bitcoinds()
self.nodes = start_nodes(3, self.options.tmpdir, [[m]] * 3)
+ while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]:
+ # reindex will leave rpc warm up "early"; Wait for it to finish
+ time.sleep(0.1)
assert_equal(balance_nodes, [self.nodes[i].getbalance() for i in range(3)])
# Exercise listsinceblock with the last two blocks