mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-05 05:02:06 +02:00
[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:
@ -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)
|
||||
|
Reference in New Issue
Block a user