Skip to content

Commit

Permalink
Revert "qt: Create legacy wallets by default"
Browse files Browse the repository at this point in the history
This reverts commit 9822576.
  • Loading branch information
lateminer committed Nov 5, 2023
1 parent 8ff2d42 commit abcda25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wallet/wallettool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit abcda25

Please sign in to comment.