diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-03-28 21:47:13 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-04-05 11:53:51 +0200 |
commit | b1dd64bffe6ead5028d3eac510b21b86f642cbba (patch) | |
tree | de852830e63776999a39617bfbbda363001ef40c /qa/rpc-tests | |
parent | f23cb7c944a89caa383435d82cf1094a68e11e55 (diff) | |
download | bitcoin-b1dd64bffe6ead5028d3eac510b21b86f642cbba.tar.xz |
[qa] wallet: Wait for reindex to catch up
Github-Pull: #7757
Rebased-From: fa3fafc96076afb15fa77e01d5f6aff88a333a7e
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-x | qa/rpc-tests/wallet.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index f8636810de..5442f38ad2 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -268,6 +268,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', @@ -281,6 +282,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 |