Skip to content

Commit 01de822

Browse files
committed
Removed redundant IsLocked() check in NewKeyPool()
1 parent d59531d commit 01de822

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,10 +2899,9 @@ bool CWallet::NewKeyPool()
28992899
walletdb.ErasePool(nIndex);
29002900
setKeyPool.clear();
29012901

2902-
if (IsLocked())
2902+
if (!TopUpKeyPool()) {
29032903
return false;
2904-
2905-
TopUpKeyPool();
2904+
}
29062905
LogPrintf("CWallet::NewKeyPool rewrote keypool\n");
29072906
}
29082907
return true;

0 commit comments

Comments
 (0)