[#btck_chainstate_manager_create]
= btck&lowbar;chainstate&lowbar;manager&lowbar;create
:mrdocs:

Create a chainstate manager&period; This is the main object for many validation tasks as well as for retrieving data from the chain and interacting with its chainstate and indexes&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_ChainstateManager-0e.adoc[btck&lowbar;ChainstateManager]*
btck&lowbar;chainstate&lowbar;manager&lowbar;create(xref:btck_ChainstateManagerOptions-08.adoc[btck&lowbar;ChainstateManagerOptions] const* chainstate&lowbar;manager&lowbar;options);
----

== Return Value

The allocated chainstate manager, 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&lowbar;options* [in]
| Non&hyphen;null, created by xref:btck_chainstate_manager_options_create.adoc[`btck&lowbar;chainstate&lowbar;manager&lowbar;options&lowbar;create`]&period;
|===


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