mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-23 02:10:51 +02:00
150340aeacb5e884cb875c77dc10c0d8b9984a33 test: remove unneeded extra_args code (josibake) 989a52e0a50c0ae30a5c2bd3c08bb3ad1363a250 test: add extra_args to BTF class (josibake) Pull request description: ## problem If you try to add `extra_args` when using `TestShell`, you will get the following error: ```python >>> import sys >>> >>> sys.path.insert(0, "/home/josibake/bitcoin/test/functional") >>> >>> from test_framework.test_shell import TestShell >>> test = TestShell().setup(num_nodes=2, extra_args=[[],['-fallbackfee=0.0002']]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/josibake/bitcoin/test/functional/test_framework/test_shell.py", line 41, in setup raise KeyError(key + " not a valid parameter key!") KeyError: 'extra_args not a valid parameter key!' >>> ``` ## solution add `self.extra_args = None` so that `extra_args` is recognized as a valid parameter to be passed to `BitcoinTestFramework` ```python >>> import sys >>> >>> sys.path.insert(0, "/home/josibake/bitcoin/test/functional") >>> >>> from test_framework.test_shell import TestShell >>> test = TestShell().setup(num_nodes=2, extra_args=[[],['-fallbackfee=0.0002']]) 2022-12-01T11:23:23.765000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_sbwthbb_ ``` ACKs for top commit: willcl-ark: re-ACK 150340aeacb5e884cb875c77dc10c0d8b9984a33 Tree-SHA512: e6fa2a780a8f2d3472c322e8cdb00ec35cb220c3b4d6ca02291eb8b41c0d8676a635fbc79c6be80e3bb71d700a2501a4b73f762478f533ae453d492d449307bb