From fae32f295cc5b57c1cb95090bb60cddb42f9778a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 17 Dec 2020 19:52:36 +0100 Subject: wallet: Add missing check for -descriptors wallet tool option --- src/wallet/wallettool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/wallet') 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; -- cgit v1.2.3