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

Method AddKeyOriginWithDB

src/wallet/scriptpubkeyman.cpp:1552–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1550}
1551
1552bool LegacyScriptPubKeyMan::AddKeyOriginWithDB(WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info)
1553{
1554 LOCK(cs_KeyStore);
1555 std::copy(info.fingerprint, info.fingerprint + 4, mapKeyMetadata[pubkey.GetID()].key_origin.fingerprint);
1556 mapKeyMetadata[pubkey.GetID()].key_origin.path = info.path;
1557 mapKeyMetadata[pubkey.GetID()].has_key_origin = true;
1558 mapKeyMetadata[pubkey.GetID()].hdKeypath = WriteHDKeypath(info.path);
1559 return batch.WriteKeyMetadata(mapKeyMetadata[pubkey.GetID()], pubkey, true);
1560}
1561
1562bool LegacyScriptPubKeyMan::ImportScripts(const std::set<CScript> scripts, int64_t timestamp)
1563{

Callers

nothing calls this directly

Calls 3

WriteHDKeypathFunction · 0.85
WriteKeyMetadataMethod · 0.80
GetIDMethod · 0.45

Tested by

no test coverage detected