[#kernel-MakeBlockInfo]
= xref:kernel.adoc[kernel]::MakeBlockInfo
:relfileprefix: ../
:mrdocs:

Builds block metadata from a block index entry&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:interfaces/BlockInfo.adoc[interfaces::BlockInfo]
MakeBlockInfo(
    xref:CBlockIndex.adoc[CBlockIndex] const* block&lowbar;index,
    xref:CBlock.adoc[CBlock] const* data = nullptr);
----

== Return Value

A BlockInfo populated from the given block index and data&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block&lowbar;index*
| Block index entry to read metadata from, may be null&period;
| *data*
| Optional block contents to attach to the result&period;
|===


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