[#btck_block_read]
= btck&lowbar;block&lowbar;read
:mrdocs:

Reads the block the passed in block tree entry points to from disk and returns it&period;

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard, &lowbar;&lowbar;nonnull&lowbar;&lowbar;&rsqb;&rsqb;
xref:btck_Block-04.adoc[btck&lowbar;Block]*
btck&lowbar;block&lowbar;read(
    xref:btck_ChainstateManager-0e.adoc[btck&lowbar;ChainstateManager] const* chainstate&lowbar;manager,
    xref:btck_BlockTreeEntry-0c.adoc[btck&lowbar;BlockTreeEntry] const* block&lowbar;tree&lowbar;entry);
----

== Return Value

The read out block, or null on error&period;

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

[cols="1,4"]
|===
| Name| Description
| *chainstate&lowbar;manager* [in]
| Non&hyphen;null&period;
| *block&lowbar;tree&lowbar;entry* [in]
| Non&hyphen;null&period;
|===


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