aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/reindex.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-10-03 10:12:28 +0200
committerMarcoFalke <falke.marco@gmail.com>2016-10-03 10:12:42 +0200
commit76f3c02fb01a6df98fbd8c16ac21d159d4649d37 (patch)
treeb29ab0e61beb75a9204d59777fe13a89dcfcf47c /qa/rpc-tests/reindex.py
parenteafc5f4fae52a16ad7343f7fb13bfecf9b62310a (diff)
parentfa7c35c4ec630838178b4674288da33561a66f08 (diff)
downloadbitcoin-76f3c02fb01a6df98fbd8c16ac21d159d4649d37.tar.xz
Merge #8860: [qa] util: Move wait_bitcoinds() into stop_nodes()
fa7c35c [qa] util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke)
Diffstat (limited to 'qa/rpc-tests/reindex.py')
-rwxr-xr-xqa/rpc-tests/reindex.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/qa/rpc-tests/reindex.py b/qa/rpc-tests/reindex.py
index abbbb10336..25cf4c1679 100755
--- a/qa/rpc-tests/reindex.py
+++ b/qa/rpc-tests/reindex.py
@@ -7,7 +7,11 @@
# Test -reindex and -reindex-chainstate with CheckBlockIndex
#
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import *
+from test_framework.util import (
+ start_nodes,
+ stop_nodes,
+ assert_equal,
+)
import time
class ReindexTest(BitcoinTestFramework):
@@ -18,16 +22,14 @@ class ReindexTest(BitcoinTestFramework):
self.num_nodes = 1
def setup_network(self):
- self.nodes = []
- self.is_network_split = False
- self.nodes.append(start_node(0, self.options.tmpdir))
+ self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
def reindex(self, justchainstate=False):
self.nodes[0].generate(3)
blockcount = self.nodes[0].getblockcount()
- stop_node(self.nodes[0], 0)
- wait_bitcoinds()
- self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug", "-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"])
+ stop_nodes(self.nodes)
+ extra_args = [["-debug", "-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]]
+ self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
while self.nodes[0].getblockcount() < blockcount:
time.sleep(0.1)
assert_equal(self.nodes[0].getblockcount(), blockcount)