Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallettool.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | if (!error_string.original.empty()) { | ||||
error_string.original); | error_string.original); | ||||
return false; | return false; | ||||
} | } | ||||
// Perform the recovery | // Perform the recovery | ||||
CWallet dummy_wallet(Params(), nullptr, WalletLocation(), | CWallet dummy_wallet(Params(), nullptr, WalletLocation(), | ||||
WalletDatabase::CreateDummy()); | WalletDatabase::CreateDummy()); | ||||
std::string backup_filename; | std::string backup_filename; | ||||
return WalletBatch::Recover(path, (void *)&dummy_wallet, | return RecoverDatabaseFile(path, (void *)&dummy_wallet, | ||||
WalletBatch::RecoverKeysOnlyFilter, | RecoverKeysOnlyFilter, backup_filename); | ||||
backup_filename); | |||||
} | } | ||||
bool ExecuteWalletToolFunc(const std::string &command, | bool ExecuteWalletToolFunc(const std::string &command, | ||||
const std::string &name) { | const std::string &name) { | ||||
fs::path path = fs::absolute(name, GetWalletDir()); | fs::path path = fs::absolute(name, GetWalletDir()); | ||||
if (command == "create") { | if (command == "create") { | ||||
std::shared_ptr<CWallet> wallet_instance = CreateWallet(name, path); | std::shared_ptr<CWallet> wallet_instance = CreateWallet(name, path); | ||||
Show All 36 Lines |