From ec2f9e1178c8e38c0a5ca063fe81adac8f916348 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 8 Jul 2019 17:05:05 -0400 Subject: Implement IsHDEnabled in DescriptorScriptPubKeyMan --- src/wallet/wallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/wallet/wallet.cpp') 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; } -- cgit v1.2.3