MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetScriptPubKeyMans

Method GetScriptPubKeyMans

src/wallet/wallet.cpp:3466–3479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3464}
3465
3466std::set<ScriptPubKeyMan*> CWallet::GetScriptPubKeyMans(const CScript& script) const
3467{
3468 std::set<ScriptPubKeyMan*> spk_mans;
3469
3470 // Search the cache for relevant SPKMs instead of iterating m_spk_managers
3471 const auto& it = m_cached_spks.find(script);
3472 if (it != m_cached_spks.end()) {
3473 spk_mans.insert(it->second.begin(), it->second.end());
3474 }
3475 SignatureData sigdata;
3476 Assume(std::all_of(spk_mans.begin(), spk_mans.end(), [&script, &sigdata](ScriptPubKeyMan* spkm) { return spkm->CanProvide(script, sigdata); }));
3477
3478 return spk_mans;
3479}
3480
3481ScriptPubKeyMan* CWallet::GetScriptPubKeyMan(const uint256& id) const
3482{

Callers 2

GetDescriptorFunction · 0.80
getaddressinfoFunction · 0.80

Calls 5

findMethod · 0.80
endMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
CanProvideMethod · 0.45

Tested by

no test coverage detected