aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-17 19:52:36 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-17 20:36:41 +0100
commitfae32f295cc5b57c1cb95090bb60cddb42f9778a (patch)
treed6edaf77832fd3bd15e371982eb55cff16963903 /src/wallet
parentfaf8f61368696b9cbbea55ead30d6a48203235ff (diff)
wallet: Add missing check for -descriptors wallet tool option
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallettool.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index e16d7f6338..a1bb7343f4 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -107,16 +107,18 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command,
{
fs::path path = fs::absolute(name, GetWalletDir());
- // -format is only allowed with createfromdump. Disallow it for all other commands.
if (args.IsArgSet("-format") && command != "createfromdump") {
tfm::format(std::cerr, "The -format option can only be used with the \"createfromdump\" command.\n");
return false;
}
- // -dumpfile is only allowed with dump and createfromdump. Disallow it for all other commands.
if (args.IsArgSet("-dumpfile") && command != "dump" && command != "createfromdump") {
tfm::format(std::cerr, "The -dumpfile option can only be used with the \"dump\" and \"createfromdump\" commands.\n");
return false;
}
+ if (args.IsArgSet("-descriptors") && command != "create") {
+ tfm::format(std::cerr, "The -descriptors option can only be used with the 'create' command.\n");
+ return false;
+ }
if (command == "create") {
DatabaseOptions options;