[#btck_chainstate_manager_import_blocks]
= btck&lowbar;chainstate&lowbar;manager&lowbar;import&lowbar;blocks
:mrdocs:

Triggers the start of a reindex if the wipe options were previously set for the chainstate manager&period; Can also import an array of existing block files selected by the user&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;
int
btck&lowbar;chainstate&lowbar;manager&lowbar;import&lowbar;blocks(
    xref:btck_ChainstateManager-0e.adoc[btck&lowbar;ChainstateManager]* chainstate&lowbar;manager,
    char const** block&lowbar;file&lowbar;paths&lowbar;data,
    size&lowbar;t* block&lowbar;file&lowbar;paths&lowbar;lens,
    size&lowbar;t block&lowbar;file&lowbar;paths&lowbar;data&lowbar;len);
----

== Return Value

0 if the import blocks call was completed successfully, non&hyphen;zero otherwise&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* [in]
| Non&hyphen;null&period;
| *block&lowbar;file&lowbar;paths&lowbar;data* [in]
| Nullable, array of block files described by their full filesystem paths&period;
| *block&lowbar;file&lowbar;paths&lowbar;lens* [in]
| Nullable, array containing the lengths of each of the paths&period;
| *block&lowbar;file&lowbar;paths&lowbar;data&lowbar;len* [in]
| Length of the block&lowbar;file&lowbar;paths&lowbar;data and block&lowbar;file&lowbar;paths&lowbar;len arrays&period;
|===


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