Skip to content

Commit

Permalink
Merge bitcoin#14805: tests: Support calling add_nodes more than once
Browse files Browse the repository at this point in the history
98a1846 tests: Support calling add_nodes more than once (Steven Roose)

Pull request description:

  Ran into this while writing [a multi-chain test for Elements](ElementsProject/elements#458) where I call this method more than once.

Tree-SHA512: f2d698fcb560552aa5d81a4c3fbf40b7269b228b34d85a118291649ef83f8c0a30cd82a28d418237b55893bcecd538046b704e64a4d8a41f2c0aef8033dc83e5
  • Loading branch information
laanwj authored and gades committed May 12, 2022
1 parent 9babfdf commit e47d8d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ def add_nodes(self, num_nodes, extra_args=None, *, rpchost=None, binary=None):
assert_equal(len(extra_confs), num_nodes)
assert_equal(len(extra_args), num_nodes)
assert_equal(len(binary), num_nodes)
old_num_nodes = len(self.nodes)
for i in range(num_nodes):
self.nodes.append(TestNode(old_num_nodes + i, get_datadir_path(self.options.tmpdir, old_num_nodes + i), self.extra_args_from_options, chain=self.chain, 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), self.extra_args_from_options, chain=self.chain, 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 cosantad"""
Expand Down

0 comments on commit e47d8d6

Please sign in to comment.