From 01de822c8dbc92d8039dd17de9193d72eb7fadd2 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 16 Jan 2017 08:57:31 +0100 Subject: [PATCH] Removed redundant IsLocked() check in NewKeyPool() --- src/wallet/wallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 349dff4f2..15dabad7f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2899,10 +2899,9 @@ bool CWallet::NewKeyPool() walletdb.ErasePool(nIndex); setKeyPool.clear(); - if (IsLocked()) + if (!TopUpKeyPool()) { return false; - - TopUpKeyPool(); + } LogPrintf("CWallet::NewKeyPool rewrote keypool\n"); } return true;