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

Method GetPubKey

src/script/descriptor.cpp:342–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340public:
341 ConstPubkeyProvider(uint32_t exp_index, const CPubKey& pubkey, bool xonly) : PubkeyProvider(exp_index), m_pubkey(pubkey), m_xonly(xonly) {}
342 std::optional<CPubKey> GetPubKey(int pos, const SigningProvider&, FlatSigningProvider& out, const DescriptorCache* read_cache = nullptr, DescriptorCache* write_cache = nullptr) const override
343 {
344 KeyOriginInfo info;
345 CKeyID keyid = m_pubkey.GetID();
346 std::copy(keyid.begin(), keyid.begin() + sizeof(info.fingerprint), info.fingerprint);
347 out.origins.emplace(keyid, std::make_pair(m_pubkey, info));
348 out.pubkeys.emplace(keyid, m_pubkey);
349 return m_pubkey;
350 }
351 bool IsRange() const override { return false; }
352 size_t GetSize() const override { return m_pubkey.size(); }
353 bool IsBIP32() const override { return false; }

Callers 9

operator<Method · 0.45
GetPubKeyMethod · 0.45
GetPrivKeyMethod · 0.45
GetPrivKeyMethod · 0.45
GetPubKeyMethod · 0.45
ExpandHelperMethod · 0.45
ParsePubkeyInnerFunction · 0.45
FromPKHBytesMethod · 0.45
InferScriptFunction · 0.45

Calls 3

emplaceMethod · 0.80
GetIDMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected