mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #16361: Remove redundant pre-TopUpKeypool check
96b6dd468a4cb6077d1a2267d620d99d39aac7d0 Remove redundant pre-TopUpKeypool checks (Gregory Sanders) Pull request description: TopUpKeypool already has a quick check for `IsLocked()` ACKs for top commit: achow101: ACK 96b6dd468a4cb6077d1a2267d620d99d39aac7d0 Reviewed the diff and checked that the `if (!IsLocked()) TopUpKeypool()` pattern is changed everywhere. Tree-SHA512: 36f5ae1be611404656ac855763e569fd3b5e932db8170f39ebda74300aa02062774b2c28ce6cf00f2ccc0e3550de58df36efa9097e24f0a51f2809b8a489c95a
This commit is contained in:
parent
35e8922274
commit
0feb04ab6f
@ -4197,8 +4197,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
|
|||||||
{
|
{
|
||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
|
|
||||||
if (IsLocked(true))
|
if (IsLocked(true)) return false;
|
||||||
return false;
|
|
||||||
|
|
||||||
// Top up key pool
|
// Top up key pool
|
||||||
unsigned int nTargetSize;
|
unsigned int nTargetSize;
|
||||||
@ -4267,7 +4266,6 @@ bool CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool, bool fRe
|
|||||||
{
|
{
|
||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
|
|
||||||
if (!IsLocked(true))
|
|
||||||
TopUpKeyPool();
|
TopUpKeyPool();
|
||||||
|
|
||||||
bool fReturningInternal = IsHDEnabled() && fRequestedInternal;
|
bool fReturningInternal = IsHDEnabled() && fRequestedInternal;
|
||||||
|
Loading…
Reference in New Issue
Block a user