diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-12-13 14:58:57 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-12-13 15:04:47 +0100 |
commit | 914faf1784d297248324640165e02e108bb2c43b (patch) | |
tree | e69705a051dde0131200c65a8e62aa733117e7d1 /test | |
parent | 20c54eef6e41216a99b16bab2b5a7c0fb701f46e (diff) | |
parent | 98a1846b00d9c3076d6dcd96244fae6f923e26a0 (diff) | |
download | bitcoin-914faf1784d297248324640165e02e108bb2c43b.tar.xz |
Merge #14805: tests: Support calling add_nodes more than once
98a1846b00d9c3076d6dcd96244fae6f923e26a0 tests: Support calling add_nodes more than once (Steven Roose)
Pull request description:
Ran into this while writing [a multi-chain test for Elements](https://github.com/ElementsProject/elements/pull/458) where I call this method more than once.
Tree-SHA512: f2d698fcb560552aa5d81a4c3fbf40b7269b228b34d85a118291649ef83f8c0a30cd82a28d418237b55893bcecd538046b704e64a4d8a41f2c0aef8033dc83e5
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 3 |
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 10d5c659ad..9649aff117 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -294,7 +294,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""" |