aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wallet/scriptpubkeyman.cpp3
-rw-r--r--src/wallet/wallet.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index 31a87a53fe..c28b7fcfa5 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -1555,7 +1555,8 @@ void DescriptorScriptPubKeyMan::MarkUnusedAddresses(const CScript& script)
bool DescriptorScriptPubKeyMan::IsHDEnabled() const
{
- return false;
+ LOCK(cs_desc_man);
+ return m_wallet_descriptor.descriptor->IsRange();
}
bool DescriptorScriptPubKeyMan::CanGetAddresses(bool internal) const
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 098b059a7b..8f42d1d75f 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1331,9 +1331,10 @@ CAmount CWallet::GetChange(const CTransaction& tx) const
bool CWallet::IsHDEnabled() const
{
+ // All Active ScriptPubKeyMans must be HD for this to be true
bool result = true;
- for (const auto& spk_man_pair : m_spk_managers) {
- result &= spk_man_pair.second->IsHDEnabled();
+ for (const auto& spk_man : GetActiveScriptPubKeyMans()) {
+ result &= spk_man->IsHDEnabled();
}
return result;
}