[#SigHashCache-Load]
= xref:SigHashCache.adoc[SigHashCache]::Load
:relfileprefix: ../
:mrdocs:

Load into writer the SHA256 midstate if found in this cache&period;

== Synopsis

Declared in `&lt;script&sol;interpreter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
Load(
    int32&lowbar;t hash&lowbar;type,
    xref:CScript.adoc[CScript] const& script&lowbar;code,
    xref:HashWriter.adoc[HashWriter]& writer) const noexcept;
----

== Return Value

`true` if a matching midstate was found and loaded&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *hash&lowbar;type*
| The sighash type selecting the cache entry&period;
| *script&lowbar;code*
| The scriptCode the cached midstate must match&period;
| *writer*
| Receives the cached SHA256 midstate on a hit&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
