mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
wallet: Use Descriptor::CanSelfExpand() in CanGetAddresses()
If a descriptor does not need any caches or private keys in order to expand, then CanGetAddresses() should return true for that descriptor.
This commit is contained in:
@@ -1222,7 +1222,7 @@ bool DescriptorScriptPubKeyMan::CanGetAddresses(bool internal) const
|
||||
LOCK(cs_desc_man);
|
||||
return m_wallet_descriptor.descriptor->IsSingleType() &&
|
||||
m_wallet_descriptor.descriptor->IsRange() &&
|
||||
(HavePrivateKeys() || m_wallet_descriptor.next_index < m_wallet_descriptor.range_end);
|
||||
(HavePrivateKeys() || m_wallet_descriptor.next_index < m_wallet_descriptor.range_end || m_wallet_descriptor.descriptor->CanSelfExpand());
|
||||
}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::HavePrivateKeys() const
|
||||
|
||||
Reference in New Issue
Block a user