aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-06-05 22:02:32 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-06-06 21:20:22 +0000
commita2a5f3f0f06cd3e3cd6203d2ef713360dcb9afe1 (patch)
tree607fbab1828fb6777e7e7f2f49085c4dc9335a2a /src/wallet
parentb823a4c9f6836c802803dbd265cb7451fb93b8e7 (diff)
wallet: Base backup filenames on original wallet filename
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/db.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index f82b59db8b..2047dc5f72 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -163,14 +163,14 @@ CDBEnv::VerifyResult CDBEnv::Verify(const std::string& strFile, recoverFunc_type
bool CDB::Recover(const std::string& filename, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue), std::string& newFilename)
{
// Recovery procedure:
- // move wallet file to wallet.timestamp.bak
+ // move wallet file to walletfilename.timestamp.bak
// Call Salvage with fAggressive=true to
// get as much data as possible.
// Rewrite salvaged data to fresh wallet file
// Set -rescan so any missing transactions will be
// found.
int64_t now = GetTime();
- newFilename = strprintf("wallet.%d.bak", now);
+ newFilename = strprintf("%s.%d.bak", filename, now);
int result = bitdb.dbenv->dbrename(NULL, filename.c_str(), NULL,
newFilename.c_str(), DB_AUTO_COMMIT);