diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index d51a655d0b..3a597eccb0 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -142,10 +142,10 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command) DatabaseOptions options; ReadDatabaseArgs(args, options); options.require_create = true; - // If -legacy is set, use it. Otherwise default to true. - bool make_legacy = args.GetBoolArg("-legacy", true); - // If neither -legacy nor -descriptors is set, default to false. If -descriptors is set, use its value. - bool make_descriptors = (!args.IsArgSet("-descriptors") && !args.IsArgSet("-legacy")) || (args.IsArgSet("-descriptors") && args.GetBoolArg("-descriptors", false)); + // If -legacy is set, use it. Otherwise default to false. + bool make_legacy = args.GetBoolArg("-legacy", false); + // If neither -legacy nor -descriptors is set, default to true. If -descriptors is set, use its value. + bool make_descriptors = (!args.IsArgSet("-descriptors") && !args.IsArgSet("-legacy")) || (args.IsArgSet("-descriptors") && args.GetBoolArg("-descriptors", true)); if (make_legacy && make_descriptors) { tfm::format(std::cerr, "Only one of -legacy or -descriptors can be set to true, not both\n"); return false;