mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge a0d37d1d23 into merged_master (Bitcoin PR bitcoin/bitcoin#27274)
This commit is contained in:
commit
dfd55ffa24
2 changed files with 5 additions and 5 deletions
|
|
@ -1390,10 +1390,10 @@ void LegacyScriptPubKeyMan::ReturnDestination(int64_t nIndex, bool fInternal, co
|
|||
WalletLogPrintf("keypool return %d\n", nIndex);
|
||||
}
|
||||
|
||||
bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type, bool internal)
|
||||
bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type)
|
||||
{
|
||||
assert(type != OutputType::BECH32M);
|
||||
if (!CanGetAddresses(internal)) {
|
||||
if (!CanGetAddresses(/*internal=*/ false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1401,10 +1401,10 @@ bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType typ
|
|||
{
|
||||
LOCK(cs_KeyStore);
|
||||
int64_t nIndex;
|
||||
if (!ReserveKeyFromKeyPool(nIndex, keypool, internal) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
|
||||
if (!ReserveKeyFromKeyPool(nIndex, keypool, /*fRequestedInternal=*/ false) && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
|
||||
if (m_storage.IsLocked()) return false;
|
||||
WalletBatch batch(m_storage.GetDatabase());
|
||||
result = GenerateNewKey(batch, m_hd_chain, internal);
|
||||
result = GenerateNewKey(batch, m_hd_chain, /*internal=*/ false);
|
||||
return true;
|
||||
}
|
||||
KeepDestination(nIndex, type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue