Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/init.cpp
Show First 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | for (const auto wallet_file : wallet_files) { | ||||
fs::path wallet_path = fs::absolute(wallet_file, GetWalletDir()); | fs::path wallet_path = fs::absolute(wallet_file, GetWalletDir()); | ||||
if (!wallet_paths.insert(wallet_path).second) { | if (!wallet_paths.insert(wallet_path).second) { | ||||
return InitError(strprintf(_("Error loading wallet %s. Duplicate " | return InitError(strprintf(_("Error loading wallet %s. Duplicate " | ||||
"-wallet filename specified."), | "-wallet filename specified."), | ||||
wallet_file)); | wallet_file)); | ||||
} | } | ||||
if (!CWallet::Verify(chainParams, wallet_file, salvage_wallet)) { | std::string error_string; | ||||
std::string warning_string; | |||||
bool verify_success = | |||||
CWallet::Verify(chainParams, wallet_file, salvage_wallet, | |||||
error_string, warning_string); | |||||
if (!error_string.empty()) { | |||||
InitError(error_string); | |||||
} | |||||
if (!warning_string.empty()) { | |||||
InitWarning(warning_string); | |||||
} | |||||
if (!verify_success) { | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool WalletInit::Open(const CChainParams &chainParams) const { | bool WalletInit::Open(const CChainParams &chainParams) const { | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |