diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-10-29 13:51:41 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-01-27 12:52:46 -0500 |
commit | 3641597d7ef6f5097a9e93cab3ef7e0f9c820296 (patch) | |
tree | 7fd21582372b3f2eb1df8495361dcaba3acbc31d /test | |
parent | b9b88f57a9b9a28e0f0614c12ae3012cf5050b10 (diff) | |
download | bitcoin-3641597d7ef6f5097a9e93cab3ef7e0f9c820296.tar.xz |
tests: Don't make any wallets unless wallet is required
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 99bf8d499a..1f5dc0a6bf 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -110,6 +110,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): # skipped. If list is truncated, wallet creation is skipped and keys # are not imported. self.wallet_names = None + # By default the wallet is not required. Set to true by skip_if_no_wallet(). + # When False, we ignore wallet_names regardless of what it is. + self.requires_wallet = False self.set_test_params() assert self.wallet_names is None or len(self.wallet_names) <= self.num_nodes if self.options.timeout_factor == 0 : @@ -393,7 +396,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): extra_args = self.extra_args self.add_nodes(self.num_nodes, extra_args) self.start_nodes() - if self.is_wallet_compiled(): + if self.requires_wallet: self.import_deterministic_coinbase_privkeys() if not self.setup_clean_chain: for n in self.nodes: @@ -785,6 +788,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): def skip_if_no_wallet(self): """Skip the running test if wallet has not been compiled.""" + self.requires_wallet = True if not self.is_wallet_compiled(): raise SkipTest("wallet has not been compiled.") if self.options.descriptors: |