mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Fix negative "keys left since backup" (#2671)
This commit is contained in:
parent
2a330f17ac
commit
ae70e8a344
@ -4262,8 +4262,10 @@ void CWallet::KeepKey(int64_t nIndex)
|
||||
if (fFileBacked)
|
||||
{
|
||||
CWalletDB walletdb(strWalletFile);
|
||||
walletdb.ErasePool(nIndex);
|
||||
nKeysLeftSinceAutoBackup = nWalletBackups ? nKeysLeftSinceAutoBackup - 1 : 0;
|
||||
if (walletdb.ErasePool(nIndex))
|
||||
--nKeysLeftSinceAutoBackup;
|
||||
if (!nWalletBackups)
|
||||
nKeysLeftSinceAutoBackup = 0;
|
||||
}
|
||||
LogPrintf("keypool keep %d\n", nIndex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user