-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Revert "tests: Support calling add_nodes more than once" #14951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 98a1846.
|
utACK faa8311 reasons: #14805 (comment) sorry @stevenroose ! |
|
utACK faa8311 |
|
Can you add a comment to |
|
Is there a reason other than it being the design we want it to? I added a comment to mention that it should be called once after the parameters for all nodes have been set up. |
That's really it. Some of the test framework infrastructure relies on the |
| for i in range(num_nodes): | ||
| 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)) | ||
| self.nodes.append(TestNode( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better readable
That's what a method Fair enough. So the correct was is to call |
Yes. If necessary, the node's arguments and config file can be updated later with |
…an once" fa4b8c9 test: add_nodes can only be called once after set_test_params (MarcoFalke) faa8311 Revert "tests: Support calling add_nodes more than once" (MarcoFalke) Pull request description: Writing tests should be straightforward and with little side-effects as possible. I don't see how this is needed and can not be achieved with `self.num_nodes` (and `self.extra_args` et al.) Tree-SHA512: 83a67f2cba9d97e21d80847ff405a4633fcb0d5674486efa57ee1813e46efe8709ae0fb462b8339a01ebeca5c4f2d29ecb1807d648b8fd9ee8ce336b08d580a8
Writing tests should be straightforward and with little side-effects as possible.
I don't see how this is needed and can not be achieved with
self.num_nodes(andself.extra_argset al.)