btck_chainstate_manager_options_set_wipe_dbs

Sets wipe db in the options. In combination with calling btck_chainstate_manager_import_blocks this triggers either a full reindex, or a reindex of just the chainstate database.

Synopsis

Declared in <kernel/bitcoinkernel.h>

[[nodiscard, __nonnull__]]
int
btck_chainstate_manager_options_set_wipe_dbs(
    btck_ChainstateManagerOptions* chainstate_manager_options,
    int wipe_block_tree_db,
    int wipe_chainstate_db);

Description

NOTE

When a wipe is set, the caller must invoke btck_chainstate_manager_import_blocks on the resulting chainstate manager before using it for anything else.

Return Value

0 if the set was successful, non-zero if the set failed.

NOTE

The return value should not be discarded.

Parameters

NameDescription
chainstate_manager_options [in]Non-null, created by btck_chainstate_manager_options_create.
wipe_block_tree_db [in]Set wipe block tree db. Should only be 1 if wipe_chainstate_db is 1 too.
wipe_chainstate_db [in]Set wipe chainstate db.