mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
wallet: Avoid showing GUI popups on RPC errors
This commit is contained in:
@@ -412,7 +412,7 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BerkeleyBatch::VerifyDatabaseFile(const fs::path& file_path, std::string& warningStr, std::string& errorStr, BerkeleyEnvironment::recoverFunc_type recoverFunc)
|
||||
bool BerkeleyBatch::VerifyDatabaseFile(const fs::path& file_path, std::vector<std::string>& warnings, std::string& errorStr, BerkeleyEnvironment::recoverFunc_type recoverFunc)
|
||||
{
|
||||
std::string walletFile;
|
||||
std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(file_path, walletFile);
|
||||
@@ -424,11 +424,11 @@ bool BerkeleyBatch::VerifyDatabaseFile(const fs::path& file_path, std::string& w
|
||||
BerkeleyEnvironment::VerifyResult r = env->Verify(walletFile, recoverFunc, backup_filename);
|
||||
if (r == BerkeleyEnvironment::VerifyResult::RECOVER_OK)
|
||||
{
|
||||
warningStr = strprintf(_("Warning: Wallet file corrupt, data salvaged!"
|
||||
warnings.push_back(strprintf(_("Warning: Wallet file corrupt, data salvaged!"
|
||||
" Original %s saved as %s in %s; if"
|
||||
" your balance or transactions are incorrect you should"
|
||||
" restore from a backup.").translated,
|
||||
walletFile, backup_filename, walletDir);
|
||||
walletFile, backup_filename, walletDir));
|
||||
}
|
||||
if (r == BerkeleyEnvironment::VerifyResult::RECOVER_FAIL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user