mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Never remove database files on shutdown, it caused unreadable wallets on some testers' machines.
This commit is contained in:
parent
1c15f88653
commit
b2d3b2d65d
3 changed files with 1 additions and 28 deletions
|
|
@ -193,8 +193,7 @@ 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.
|
||||
if (CDB::Rewrite(strWalletFile))
|
||||
RemoveLogFilesOnShutdown(true);
|
||||
CDB::Rewrite(strWalletFile);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -1154,7 +1153,6 @@ 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue