mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge ff0aad8a40 into merged_master (Bitcoin PR #16361)
This commit is contained in:
commit
8a94b6b2cb
1 changed files with 6 additions and 10 deletions
|
|
@ -4064,8 +4064,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
|
|||
{
|
||||
LOCK(cs_wallet);
|
||||
|
||||
if (IsLocked())
|
||||
return false;
|
||||
if (IsLocked()) return false;
|
||||
|
||||
// Top up key pool
|
||||
unsigned int nTargetSize;
|
||||
|
|
@ -4126,8 +4125,7 @@ bool CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool, bool fRe
|
|||
{
|
||||
LOCK(cs_wallet);
|
||||
|
||||
if (!IsLocked())
|
||||
TopUpKeyPool();
|
||||
TopUpKeyPool();
|
||||
|
||||
bool fReturningInternal = fRequestedInternal;
|
||||
fReturningInternal &= (IsHDEnabled() && CanSupportFeature(FEATURE_HD_SPLIT)) || IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS);
|
||||
|
|
@ -4229,9 +4227,8 @@ bool CWallet::GetNewDestination(const OutputType type, const std::string label,
|
|||
{
|
||||
LOCK(cs_wallet);
|
||||
error.clear();
|
||||
if (!IsLocked()) {
|
||||
TopUpKeyPool();
|
||||
}
|
||||
|
||||
TopUpKeyPool();
|
||||
|
||||
// Generate a new key that is added to wallet
|
||||
CPubKey new_key;
|
||||
|
|
@ -4253,9 +4250,8 @@ bool CWallet::GetNewDestination(const OutputType type, const std::string label,
|
|||
bool CWallet::GetNewChangeDestination(const OutputType type, CTxDestination& dest, std::string& error, bool add_blinding_key)
|
||||
{
|
||||
error.clear();
|
||||
if (!IsLocked()) {
|
||||
TopUpKeyPool();
|
||||
}
|
||||
|
||||
TopUpKeyPool();
|
||||
|
||||
ReserveDestination reservedest(this);
|
||||
if (!reservedest.GetReservedDestination(type, dest, true)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue