Skip to content

Commit 05ab6bc

Browse files
committed
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.
1 parent 852c9a8 commit 05ab6bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ bool DescriptorScriptPubKeyMan::CanGetAddresses(bool internal) const
11801180
LOCK(cs_desc_man);
11811181
return m_wallet_descriptor.descriptor->IsSingleType() &&
11821182
m_wallet_descriptor.descriptor->IsRange() &&
1183-
(HavePrivateKeys() || m_wallet_descriptor.next_index < m_wallet_descriptor.range_end);
1183+
(HavePrivateKeys() || m_wallet_descriptor.next_index < m_wallet_descriptor.range_end || m_wallet_descriptor.descriptor->CanSelfExpand());
11841184
}
11851185

11861186
bool DescriptorScriptPubKeyMan::HavePrivateKeys() const

0 commit comments

Comments
 (0)