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

Create options for the chainstate manager&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_ChainstateManagerOptions-08.adoc[btck&lowbar;ChainstateManagerOptions]*
btck&lowbar;chainstate&lowbar;manager&lowbar;options&lowbar;create(
    xref:btck_Context-07.adoc[btck&lowbar;Context] const* context,
    char const* data&lowbar;directory,
    size&lowbar;t data&lowbar;directory&lowbar;len,
    char const* blocks&lowbar;directory,
    size&lowbar;t blocks&lowbar;directory&lowbar;len);
----

== Return Value

The allocated chainstate manager options, or null on error (e&period;g&period; if a path is invalid)&period;

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

[cols="1,4"]
|===
| Name| Description
| *context* [in]
| Non&hyphen;null, the created options and through it the chainstate manager will associate with this kernel context for the duration of their lifetimes&period;
| *data&lowbar;directory* [in]
| Path string of the directory containing the chainstate data&period; If the directory does not exist yet, it will be created&period;
| *blocks&lowbar;directory* [in]
| Path string of the directory containing the block data&period; If the directory does not exist yet, it will be created&period;
| *data&lowbar;directory&lowbar;len* [in]
| Length in bytes of `data&lowbar;directory` (not including a trailing NUL)&period;
| *blocks&lowbar;directory&lowbar;len* [in]
| Length in bytes of `blocks&lowbar;directory` (not including a trailing NUL)&period;
|===


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