aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-10-06 17:52:05 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-10-08 13:02:14 -0400
commitfacec1c643105d0ae74b5d32cf33d593f9e82a36 (patch)
tree70ddbd9cd41bb94a5667ec8ccc24c45b7ffe203f /src/wallet/db.cpp
parent94e6e9f38deeba61655fee432afe42e66ff72ea3 (diff)
downloadbitcoin-facec1c643105d0ae74b5d32cf33d593f9e82a36.tar.xz
wallet: Avoid showing GUI popups on RPC errors
Diffstat (limited to 'src/wallet/db.cpp')
-rw-r--r--src/wallet/db.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 26aeb754ad..e48eee6c2c 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -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)
{