mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +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)
|
if (fFileBacked)
|
||||||
{
|
{
|
||||||
CWalletDB walletdb(strWalletFile);
|
CWalletDB walletdb(strWalletFile);
|
||||||
walletdb.ErasePool(nIndex);
|
if (walletdb.ErasePool(nIndex))
|
||||||
nKeysLeftSinceAutoBackup = nWalletBackups ? nKeysLeftSinceAutoBackup - 1 : 0;
|
--nKeysLeftSinceAutoBackup;
|
||||||
|
if (!nWalletBackups)
|
||||||
|
nKeysLeftSinceAutoBackup = 0;
|
||||||
}
|
}
|
||||||
LogPrintf("keypool keep %d\n", nIndex);
|
LogPrintf("keypool keep %d\n", nIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user