[#btck_chainstate_manager_options_set_wipe_dbs]
= btck&lowbar;chainstate&lowbar;manager&lowbar;options&lowbar;set&lowbar;wipe&lowbar;dbs
:mrdocs:

Sets wipe db in the options&period; In combination with calling xref:btck_chainstate_manager_import_blocks.adoc[`btck&lowbar;chainstate&lowbar;manager&lowbar;import&lowbar;blocks`] this triggers either a full reindex, or a reindex of just the chainstate database&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;options&lowbar;set&lowbar;wipe&lowbar;dbs(
    xref:btck_ChainstateManagerOptions-08.adoc[btck&lowbar;ChainstateManagerOptions]* chainstate&lowbar;manager&lowbar;options,
    int wipe&lowbar;block&lowbar;tree&lowbar;db,
    int wipe&lowbar;chainstate&lowbar;db);
----

== Description

[NOTE]
====
When a wipe is set, the caller must invoke xref:btck_chainstate_manager_import_blocks.adoc[`btck&lowbar;chainstate&lowbar;manager&lowbar;import&lowbar;blocks`] on the resulting chainstate manager before using it for anything else&period;

====

== Return Value

0 if the set was successful, non&hyphen;zero if the set failed&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;
| *wipe&lowbar;block&lowbar;tree&lowbar;db* [in]
| Set wipe block tree db&period; Should only be 1 if wipe&lowbar;chainstate&lowbar;db is 1 too&period;
| *wipe&lowbar;chainstate&lowbar;db* [in]
| Set wipe chainstate db&period;
|===


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