aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-06-05 22:01:48 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-06-06 21:17:09 +0000
commitb823a4c9f6836c802803dbd265cb7451fb93b8e7 (patch)
treecb2617a99de25ac9d2c685020949e7416e5b471b /src/wallet/db.h
parent84dcb45017a85e358fed274c49b342a40a1d1233 (diff)
downloadbitcoin-b823a4c9f6836c802803dbd265cb7451fb93b8e7.tar.xz
wallet: Include actual backup filename in recovery warning message
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index a2ede99d1b..ba37853572 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -55,7 +55,8 @@ public:
enum VerifyResult { VERIFY_OK,
RECOVER_OK,
RECOVER_FAIL };
- VerifyResult Verify(const std::string& strFile, bool (*recoverFunc)(const std::string& strFile));
+ typedef bool (*recoverFunc_type)(const std::string& strFile, std::string& out_backup_filename);
+ VerifyResult Verify(const std::string& strFile, recoverFunc_type recoverFunc, std::string& out_backup_filename);
/**
* Salvage data from a file that Verify says is bad.
* fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation).
@@ -156,7 +157,7 @@ public:
void Flush();
void Close();
- static bool Recover(const std::string& filename, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue));
+ static bool Recover(const std::string& filename, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue), std::string& out_backup_filename);
/* flush the wallet passively (TRY_LOCK)
ideal to be called periodically */
@@ -164,7 +165,7 @@ public:
/* verifies the database environment */
static bool VerifyEnvironment(const std::string& walletFile, const fs::path& dataDir, std::string& errorStr);
/* verifies the database file */
- static bool VerifyDatabaseFile(const std::string& walletFile, const fs::path& dataDir, std::string& warningStr, std::string& errorStr, bool (*recoverFunc)(const std::string& strFile));
+ static bool VerifyDatabaseFile(const std::string& walletFile, const fs::path& dataDir, std::string& warningStr, std::string& errorStr, CDBEnv::recoverFunc_type recoverFunc);
private:
CDB(const CDB&);