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

Method AddWatchOnlyWithDB

src/wallet/scriptpubkeyman.cpp:924–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924bool LegacyScriptPubKeyMan::AddWatchOnlyWithDB(WalletBatch &batch, const CScript& dest)
925{
926 if (!AddWatchOnlyInMem(dest))
927 return false;
928 const CKeyMetadata& meta = m_script_metadata[CScriptID(dest)];
929 UpdateTimeFirstKey(meta.nCreateTime);
930 NotifyWatchonlyChanged(true);
931 if (batch.WriteWatchOnly(dest, meta)) {
932 m_storage.UnsetBlankWalletFlag(batch);
933 return true;
934 }
935 return false;
936}
937
938bool LegacyScriptPubKeyMan::AddWatchOnlyWithDB(WalletBatch &batch, const CScript& dest, int64_t create_time)
939{

Callers

nothing calls this directly

Calls 4

CScriptIDClass · 0.85
NotifyWatchonlyChangedFunction · 0.85
WriteWatchOnlyMethod · 0.80
UnsetBlankWalletFlagMethod · 0.80

Tested by

no test coverage detected