SigHashCache::Load

Load into writer the SHA256 midstate if found in this cache.

Synopsis

Declared in <script/interpreter.h>

[[nodiscard]]
bool
Load(
    int32_t hash_type,
    CScript const& script_code,
    HashWriter& writer) const noexcept;

Return Value

true if a matching midstate was found and loaded.

NOTE

The return value should not be discarded.

Parameters

NameDescription
hash_typeThe sighash type selecting the cache entry.
script_codeThe scriptCode the cached midstate must match.
writerReceives the cached SHA256 midstate on a hit.