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

Method GetMetadata

src/wallet/scriptpubkeyman.cpp:1454–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452}
1453
1454std::unique_ptr<CKeyMetadata> DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination& dest) const
1455{
1456 std::unique_ptr<SigningProvider> provider = GetSigningProvider(GetScriptForDestination(dest));
1457 if (provider) {
1458 KeyOriginInfo orig;
1459 CKeyID key_id = GetKeyForDestination(*provider, dest);
1460 if (provider->GetKeyOrigin(key_id, orig)) {
1461 LOCK(cs_desc_man);
1462 std::unique_ptr<CKeyMetadata> meta = std::make_unique<CKeyMetadata>();
1463 meta->key_origin = orig;
1464 meta->has_key_origin = true;
1465 meta->nCreateTime = m_wallet_descriptor.creation_time;
1466 return meta;
1467 }
1468 }
1469 return nullptr;
1470}
1471
1472uint256 DescriptorScriptPubKeyMan::GetID() const
1473{

Callers 2

getaddressinfoFunction · 0.45

Calls 3

GetScriptForDestinationFunction · 0.85
GetKeyForDestinationFunction · 0.85
GetKeyOriginMethod · 0.45

Tested by

no test coverage detected