From fa7c35c4ec630838178b4674288da33561a66f08 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 1 Oct 2016 21:07:31 +0200 Subject: [qa] util: Move wait_bitcoinds() into stop_nodes() --- qa/rpc-tests/reindex.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'qa/rpc-tests/reindex.py') 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) -- cgit v1.2.3