[#btck_chain_get_by_height]
= btck&lowbar;chain&lowbar;get&lowbar;by&lowbar;height
:mrdocs:

Retrieve a block tree entry by its height in the currently active chain&period; Once retrieved there is no guarantee that it remains in the active chain&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;&lowbar;&lowbar;nonnull&lowbar;&lowbar;&rsqb;&rsqb;
xref:btck_BlockTreeEntry-0c.adoc[btck&lowbar;BlockTreeEntry] const*
btck&lowbar;chain&lowbar;get&lowbar;by&lowbar;height(
    xref:btck_Chain-09.adoc[btck&lowbar;Chain] const* chain,
    int32&lowbar;t block&lowbar;height);
----

== Return Value

The block tree entry at a certain height in the currently active chain, or null if the height is out of bounds&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *chain* [in]
| Non&hyphen;null&period;
| *block&lowbar;height* [in]
| Height in the chain of the to be retrieved block tree entry&period;
|===


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