diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2011-11-17 14:21:32 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2011-11-17 14:21:32 -0500 |
commit | 1c15f88653b0f60fe5e021192cbb81c4f193159c (patch) | |
tree | d8c2866922bf157e83d861bb2f26976a1169ba38 /src/wallet.cpp | |
parent | 37971fcc76b867681b1df5ee962f3d2a7f12a86e (diff) |
Only remove database log files on shutdown after wallet encryption/rewritev0.5.0rc6
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 24a592689e..87882a3b96 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -193,8 +193,8 @@ bool CWallet::EncryptWallet(const string& strWalletPassphrase) // Need to completely rewrite the wallet file; if we don't, bdb might keep // bits of the unencrypted private key in slack space in the database file. - setKeyPool.clear(); - CDB::Rewrite(strWalletFile); + if (CDB::Rewrite(strWalletFile)) + RemoveLogFilesOnShutdown(true); } return true; @@ -1154,6 +1154,7 @@ int CWallet::LoadWallet(bool& fFirstRunRet) { if (CDB::Rewrite(strWalletFile, "\x04pool")) { + RemoveLogFilesOnShutdown(true); setKeyPool.clear(); // Note: can't top-up keypool here, because wallet is locked. // User will be prompted to unlock wallet the next operation |