[#node-BlockManager-ReadBlock-00]
= xref:node.adoc[node]::xref:node/BlockManager.adoc[BlockManager]::ReadBlock
:relfileprefix: ../../
:mrdocs:

Functions for disk access for blocks

== Synopsis

Declared in `&lt;node&sol;blockstorage&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
ReadBlock(
    xref:CBlock.adoc[CBlock]& block,
    xref:FlatFilePos.adoc[FlatFilePos] const& pos,
    std::optional&lt;uint256&gt; const& expected&lowbar;hash) const;
----

== Return Value

True on success, false if the block could not be read or verified&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block*
| Output filled with the deserialized block&period;
| *pos*
| Position of the serialized block on disk&period;
| *expected&lowbar;hash*
| Expected block hash used to verify the read, if provided&period;
|===


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