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

Method Load

src/script/interpreter.cpp:2840–2851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2838}
2839
2840bool SigHashCache::Load(int32_t hash_type, const CScript& script_code, CHashWriter& writer) const noexcept
2841{
2842 auto& entry = m_cache_entries[CacheIndex(hash_type)];
2843 if (entry.has_value()) {
2844 if (script_code == entry->first) {
2845 writer.~CHashWriter();
2846 new (&writer) CHashWriter(entry->second);
2847 return true;
2848 }
2849 }
2850 return false;
2851}
2852
2853void SigHashCache::Store(int32_t hash_type, const CScript& script_code, const CHashWriter& writer) noexcept
2854{

Callers 2

EvalScriptFunction · 0.45
SignatureHashFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected