InitBlockFilterIndex

Initialize a block filter index for the given type if one does not already exist. Returns true if a new index is created and false if one has already been initialized.

Synopsis

Declared in <index/blockfilterindex.h>

bool
InitBlockFilterIndex(
    std::function<std::unique_ptr<interfaces::Chain>()> make_chain,
    BlockFilterType filter_type,
    size_t n_cache_size,
    bool f_memory = false,
    bool f_wipe = false);

Return Value

True if a new index was created, false if one already existed.

Parameters

NameDescription
make_chainFactory that creates a chain interface for the index.
filter_typeFilter type of the index to create.
n_cache_sizeSize of the database cache, in bytes.
f_memoryKeep the database in memory instead of on disk.
f_wipeErase any existing database before opening.