[tests] Functional tests call self.start_node(s) and self.stop_node(s)

This commit changes the individual test scripts to call the
start_node(s) and stop_node(s) methods in BitcoinTestFramework.
This commit is contained in:
John Newbery
2017-03-23 23:56:31 -04:00
parent c1c9a95379
commit d8c218f9c2
30 changed files with 93 additions and 106 deletions

View File

@ -10,11 +10,7 @@
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
start_nodes,
stop_nodes,
assert_equal,
)
from test_framework.util import assert_equal
import time
class ReindexTest(BitcoinTestFramework):
@ -27,9 +23,9 @@ class ReindexTest(BitcoinTestFramework):
def reindex(self, justchainstate=False):
self.nodes[0].generate(3)
blockcount = self.nodes[0].getblockcount()
stop_nodes(self.nodes)
self.stop_nodes()
extra_args = [["-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
self.nodes = self.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)