aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSteven Roose <steven@stevenroose.org>2018-11-21 18:02:06 +0000
committerSteven Roose <steven@stevenroose.org>2018-11-21 18:03:01 +0000
commit98a1846b00d9c3076d6dcd96244fae6f923e26a0 (patch)
tree72cc6a2c9f95fcb36ac14ed24029973a89af2083 /test
parent16498860546e11b010a07bf49440aadf214bf5bf (diff)
tests: Support calling add_nodes more than once
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/test_framework/test_framework.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 44fc185e6d..da92450110 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -292,7 +292,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
assert_equal(len(extra_args), num_nodes)
assert_equal(len(binary), num_nodes)
for i in range(num_nodes):
- self.nodes.append(TestNode(i, get_datadir_path(self.options.tmpdir, i), rpchost=rpchost, timewait=self.rpc_timewait, bitcoind=binary[i], bitcoin_cli=self.options.bitcoincli, mocktime=self.mocktime, coverage_dir=self.options.coveragedir, extra_conf=extra_confs[i], extra_args=extra_args[i], use_cli=self.options.usecli))
+ numnode = len(self.nodes)
+ self.nodes.append(TestNode(numnode, get_datadir_path(self.options.tmpdir, numnode), rpchost=rpchost, timewait=self.rpc_timewait, bitcoind=binary[i], bitcoin_cli=self.options.bitcoincli, mocktime=self.mocktime, coverage_dir=self.options.coveragedir, extra_conf=extra_confs[i], extra_args=extra_args[i], use_cli=self.options.usecli))
def start_node(self, i, *args, **kwargs):
"""Start a bitcoind"""