We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a330f1 commit ae70e8aCopy full SHA for ae70e8a
1 file changed
src/wallet/wallet.cpp
@@ -4262,8 +4262,10 @@ void CWallet::KeepKey(int64_t nIndex)
4262
if (fFileBacked)
4263
{
4264
CWalletDB walletdb(strWalletFile);
4265
- walletdb.ErasePool(nIndex);
4266
- nKeysLeftSinceAutoBackup = nWalletBackups ? nKeysLeftSinceAutoBackup - 1 : 0;
+ if (walletdb.ErasePool(nIndex))
+ --nKeysLeftSinceAutoBackup;
4267
+ if (!nWalletBackups)
4268
+ nKeysLeftSinceAutoBackup = 0;
4269
}
4270
LogPrintf("keypool keep %d\n", nIndex);
4271
0 commit comments