aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/functional/test_framework/test_framework.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index d88cccecd9..1140d26f4f 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -449,11 +449,15 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
def add_wallet_options(self, parser, *, descriptors=True, legacy=True):
group = parser.add_mutually_exclusive_group()
+ kwargs = {}
+ if descriptors + legacy == 1:
+ # If only one type can be chosen, set it as default
+ kwargs["default"] = descriptors
if descriptors:
- group.add_argument("--descriptors", action='store_const', const=True,
+ group.add_argument("--descriptors", action='store_const', const=True, **kwargs,
help="Run test using a descriptor wallet", dest='descriptors')
if legacy:
- group.add_argument("--legacy-wallet", action='store_const', const=False,
+ group.add_argument("--legacy-wallet", action='store_const', const=False, **kwargs,
help="Run test using legacy wallets", dest='descriptors')
def add_nodes(self, num_nodes: int, extra_args=None, *, rpchost=None, binary=None, binary_cli=None, versions=None):