[#btck_chainstate_manager_get_best_entry]
= btck&lowbar;chainstate&lowbar;manager&lowbar;get&lowbar;best&lowbar;entry
:mrdocs:

Get the btck&lowbar;BlockTreeEntry whose associated btck&lowbar;BlockHeader has the most known cumulative proof of work&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;chainstate&lowbar;manager&lowbar;get&lowbar;best&lowbar;entry(xref:btck_ChainstateManager-0e.adoc[btck&lowbar;ChainstateManager] const* chainstate&lowbar;manager);
----

== Return Value

The btck&lowbar;BlockTreeEntry, or null if no block headers have been loaded&period;

== Parameters

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


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