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

Method AddWatchOnlyInMem

src/wallet/scriptpubkeyman.cpp:912–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912bool LegacyScriptPubKeyMan::AddWatchOnlyInMem(const CScript &dest)
913{
914 LOCK(cs_KeyStore);
915 setWatchOnly.insert(dest);
916 CPubKey pubKey;
917 if (ExtractPubKey(dest, pubKey)) {
918 mapWatchKeys[pubKey.GetID()] = pubKey;
919 ImplicitlyLearnRelatedKeyScripts(pubKey);
920 }
921 return true;
922}
923
924bool LegacyScriptPubKeyMan::AddWatchOnlyWithDB(WalletBatch &batch, const CScript& dest)
925{

Callers

nothing calls this directly

Calls 3

ExtractPubKeyFunction · 0.85
insertMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected