From 989a52e0a50c0ae30a5c2bd3c08bb3ad1363a250 Mon Sep 17 00:00:00 2001 From: josibake Date: Thu, 1 Dec 2022 12:14:10 +0100 Subject: [PATCH 1/2] test: add extra_args to BTF class this allows us to pass extra_args when using TestShell --- test/functional/test_framework/test_framework.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index b1164b98fd..3c40eafc79 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -97,6 +97,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.chain: str = 'regtest' self.setup_clean_chain: bool = False self.nodes: List[TestNode] = [] + self.extra_args = None self.network_thread = None self.rpc_timeout = 60 # Wait for up to 60 seconds for the RPC server to respond self.supports_cli = True From 150340aeacb5e884cb875c77dc10c0d8b9984a33 Mon Sep 17 00:00:00 2001 From: josibake Date: Thu, 1 Dec 2022 16:55:43 +0100 Subject: [PATCH 2/2] test: remove unneeded extra_args code --- test/functional/test_framework/test_framework.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 3c40eafc79..2d7f2a13e8 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -408,10 +408,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): def setup_nodes(self): """Override this method to customize test node setup""" - extra_args = [[]] * self.num_nodes - if hasattr(self, "extra_args"): - extra_args = self.extra_args - self.add_nodes(self.num_nodes, extra_args) + self.add_nodes(self.num_nodes, self.extra_args) self.start_nodes() if self.requires_wallet: self.import_deterministic_coinbase_privkeys()