MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetDescriptorScriptPubKeyMan

Method GetDescriptorScriptPubKeyMan

src/wallet/wallet.cpp:3793–3804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3791}
3792
3793DescriptorScriptPubKeyMan* CWallet::GetDescriptorScriptPubKeyMan(const WalletDescriptor& desc) const
3794{
3795 for (auto& spk_man_pair : m_spk_managers) {
3796 // Try to downcast to DescriptorScriptPubKeyMan then check if the descriptors match
3797 DescriptorScriptPubKeyMan* spk_manager = dynamic_cast<DescriptorScriptPubKeyMan*>(spk_man_pair.second.get());
3798 if (spk_manager != nullptr && spk_manager->HasWalletDescriptor(desc)) {
3799 return spk_manager;
3800 }
3801 }
3802
3803 return nullptr;
3804}
3805
3806std::optional<bool> CWallet::IsInternalScriptPubKeyMan(ScriptPubKeyMan* spk_man) const
3807{

Callers 1

backup.cppFile · 0.80

Calls 2

HasWalletDescriptorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected