aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallettool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallettool.cpp')
-rw-r--r--src/wallet/wallettool.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index 9cd18dd0a5..769175b5a8 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -140,6 +140,7 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
if (command == "create") {
DatabaseOptions options;
+ ReadDatabaseArgs(args, options);
options.require_create = true;
// If -legacy is set, use it. Otherwise default to false.
bool make_legacy = args.GetBoolArg("-legacy", false);
@@ -165,6 +166,7 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
}
} else if (command == "info") {
DatabaseOptions options;
+ ReadDatabaseArgs(args, options);
options.require_existing = true;
const std::shared_ptr<CWallet> wallet_instance = MakeWallet(name, path, args, options);
if (!wallet_instance) return false;
@@ -174,7 +176,7 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
#ifdef USE_BDB
bilingual_str error;
std::vector<bilingual_str> warnings;
- bool ret = RecoverDatabaseFile(path, error, warnings);
+ bool ret = RecoverDatabaseFile(args, path, error, warnings);
if (!ret) {
for (const auto& warning : warnings) {
tfm::format(std::cerr, "%s\n", warning.original);
@@ -190,11 +192,12 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
#endif
} else if (command == "dump") {
DatabaseOptions options;
+ ReadDatabaseArgs(args, options);
options.require_existing = true;
const std::shared_ptr<CWallet> wallet_instance = MakeWallet(name, path, args, options);
if (!wallet_instance) return false;
bilingual_str error;
- bool ret = DumpWallet(*wallet_instance, error);
+ bool ret = DumpWallet(args, *wallet_instance, error);
if (!ret && !error.empty()) {
tfm::format(std::cerr, "%s\n", error.original);
return ret;
@@ -204,7 +207,7 @@ bool ExecuteWalletToolFunc(const ArgsManager& args, const std::string& command)
} else if (command == "createfromdump") {
bilingual_str error;
std::vector<bilingual_str> warnings;
- bool ret = CreateFromDump(name, path, error, warnings);
+ bool ret = CreateFromDump(args, name, path, error, warnings);
for (const auto& warning : warnings) {
tfm::format(std::cout, "%s\n", warning.original);
}