aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-18 07:55:51 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-18 07:56:15 +0100
commitb27104dc52769fc1346a3049dd7d3f6d8b2ac3d2 (patch)
tree8c2fc58eed380b379f11b88618b8cbf520b1fc6f /test
parent9b28bd73a33bdadbc5ac44b101edb58418aee6c3 (diff)
parentfae32f295cc5b57c1cb95090bb60cddb42f9778a (diff)
downloadbitcoin-b27104dc52769fc1346a3049dd7d3f6d8b2ac3d2.tar.xz
Merge #20687: wallet: Add missing check for -descriptors wallet tool option
fae32f295cc5b57c1cb95090bb60cddb42f9778a wallet: Add missing check for -descriptors wallet tool option (MarcoFalke) faf8f61368696b9cbbea55ead30d6a48203235ff test: Add missing check for is_sqlite_compiled (MarcoFalke) fa7dde1c418e2e700853bd30cc9e012c4e4c5ef2 wallet: Pass ArgsManager into ExecuteWalletToolFunc instead of using global (MarcoFalke) Pull request description: Also, fix a test failure when compiled without sqlite ACKs for top commit: ryanofsky: Code review ACK fae32f295cc5b57c1cb95090bb60cddb42f9778a. Thanks for implementing the -descriptors check and dealing with the test failure! jonatack: Code review utACK fae32f295cc5b57c1cb95090bb60cddb42f9778a Tree-SHA512: 3d7710694085822739a8316e4abc6db270799ca6ff6b0f9e5563ae240da65ae6a9cab7ba2647feae6ba540dac40b55b38ed41c8f6ed0bf02a3d1536284448927
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/tool_wallet.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py
index 1093982929..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,11 +344,13 @@ 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")
self.do_tool_createfromdump("load-bdb", "wallet.dump", "bdb")
- self.do_tool_createfromdump("load-sqlite", "wallet.dump", "sqlite")
+ if self.is_sqlite_compiled():
+ self.do_tool_createfromdump("load-sqlite", "wallet.dump", "sqlite")
self.log.info('Checking createfromdump handling of magic and versions')
bad_ver_wallet_dump = os.path.join(self.nodes[0].datadir, "wallet-bad_ver1.dump")