Bitcoin ABC 0.30.7
P2P Digital Currency
Classes | Functions | Variables
blockfilterindex.h File Reference
#include <blockfilter.h>
#include <chain.h>
#include <flatfile.h>
#include <index/base.h>
#include <util/hasher.h>
Include dependency graph for blockfilterindex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BlockFilterIndex
 BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of blocks by height. More...
 

Functions

BlockFilterIndexGetBlockFilterIndex (BlockFilterType filter_type)
 Get a block filter index by type. More...
 
void ForEachBlockFilterIndex (std::function< void(BlockFilterIndex &)> fn)
 Iterate over all running block filter indexes, invoking fn on each. More...
 
bool InitBlockFilterIndex (BlockFilterType filter_type, size_t n_cache_size, bool f_memory=false, bool f_wipe=false)
 Initialize a block filter index for the given type if one does not already exist. More...
 
bool DestroyBlockFilterIndex (BlockFilterType filter_type)
 Destroy the block filter index with the given type. More...
 
void DestroyAllBlockFilterIndexes ()
 Destroy all open block filter indexes. More...
 

Variables

static const char *const DEFAULT_BLOCKFILTERINDEX = "0"
 
static constexpr int CFCHECKPT_INTERVAL = 1000
 Interval between compact filter checkpoints. More...
 

Function Documentation

◆ DestroyAllBlockFilterIndexes()

void DestroyAllBlockFilterIndexes ( )

Destroy all open block filter indexes.

Definition at line 510 of file blockfilterindex.cpp.

Here is the caller graph for this function:

◆ DestroyBlockFilterIndex()

bool DestroyBlockFilterIndex ( BlockFilterType  filter_type)

Destroy the block filter index with the given type.

Returns false if no such index exists. This just releases the allocated memory and closes the database connection, it does not delete the index data.

Definition at line 506 of file blockfilterindex.cpp.

◆ ForEachBlockFilterIndex()

void ForEachBlockFilterIndex ( std::function< void(BlockFilterIndex &)>  fn)

Iterate over all running block filter indexes, invoking fn on each.

Definition at line 492 of file blockfilterindex.cpp.

Here is the caller graph for this function:

◆ GetBlockFilterIndex()

BlockFilterIndex * GetBlockFilterIndex ( BlockFilterType  filter_type)

Get a block filter index by type.

Returns nullptr if index has not been initialized or was already destroyed.

Definition at line 487 of file blockfilterindex.cpp.

Here is the caller graph for this function:

◆ InitBlockFilterIndex()

bool InitBlockFilterIndex ( BlockFilterType  filter_type,
size_t  n_cache_size,
bool  f_memory = false,
bool  f_wipe = false 
)

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.

Definition at line 498 of file blockfilterindex.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ CFCHECKPT_INTERVAL

constexpr int CFCHECKPT_INTERVAL = 1000
staticconstexpr

Interval between compact filter checkpoints.

See BIP 157.

Definition at line 17 of file blockfilterindex.h.

◆ DEFAULT_BLOCKFILTERINDEX

const char* const DEFAULT_BLOCKFILTERINDEX = "0"
static

Definition at line 14 of file blockfilterindex.h.