diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-12-17 19:52:36 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-12-17 20:36:41 +0100 |
commit | fae32f295cc5b57c1cb95090bb60cddb42f9778a (patch) | |
tree | d6edaf77832fd3bd15e371982eb55cff16963903 /test/functional/tool_wallet.py | |
parent | faf8f61368696b9cbbea55ead30d6a48203235ff (diff) | |
download | bitcoin-fae32f295cc5b57c1cb95090bb60cddb42f9778a.tar.xz |
wallet: Add missing check for -descriptors wallet tool option
Diffstat (limited to 'test/functional/tool_wallet.py')
-rwxr-xr-x | test/functional/tool_wallet.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index 288128e00e..8a1af24dcf 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -31,7 +31,7 @@ class ToolWalletTest(BitcoinTestFramework): def bitcoin_wallet_process(self, *args): binary = self.config["environment"]["BUILDDIR"] + '/src/bitcoin-wallet' + self.config["environment"]["EXEEXT"] default_args = ['-datadir={}'.format(self.nodes[0].datadir), '-chain=%s' % self.chain] - if self.options.descriptors: + if self.options.descriptors and 'create' in args: default_args.append('-descriptors') return subprocess.Popen([binary] + default_args + list(args), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) @@ -344,6 +344,7 @@ class ToolWalletTest(BitcoinTestFramework): self.assert_raises_tool_error('Dump file {} does not exist.'.format(non_exist_dump), '-wallet=todump', '-dumpfile={}'.format(non_exist_dump), 'createfromdump') wallet_path = os.path.join(self.nodes[0].datadir, 'regtest/wallets/todump2') self.assert_raises_tool_error('Failed to create database path \'{}\'. Database already exists.'.format(wallet_path), '-wallet=todump2', '-dumpfile={}'.format(wallet_dump), 'createfromdump') + self.assert_raises_tool_error("The -descriptors option can only be used with the 'create' command.", '-descriptors', '-wallet=todump2', '-dumpfile={}'.format(wallet_dump), 'createfromdump') self.log.info('Checking createfromdump') self.do_tool_createfromdump("load", "wallet.dump") |