Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
blockfilter.cpp File Reference
#include <mutex>
#include <set>
#include <string_view>
#include <blockfilter.h>
#include <crypto/siphash.h>
#include <hash.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <streams.h>
#include <undo.h>
#include <util/golombrice.h>
#include <util/string.h>
Include dependency graph for blockfilter.cpp:

Go to the source code of this file.

Functions

const std::string & BlockFilterTypeName (BlockFilterType filter_type)
 Get the human-readable name for a filter type.
bool BlockFilterTypeByName (std::string_view name, BlockFilterType &filter_type)
 Find a filter type by its human-readable name.
const std::set< BlockFilterType > & AllBlockFilterTypes ()
 Get a list of known filter types.
const std::string & ListBlockFilterTypes ()
 Get a comma-separated list of known filter type names.
static GCSFilter::ElementSet BasicFilterElements (const CBlock &block, const CBlockUndo &block_undo)
template<typename C, typename S, typename UnaryOp>
auto Join (const C &container, const S &separator, UnaryOp unary_op)
 Join all container items.

Variables

static const std::map< BlockFilterType, std::string > g_filter_types

Function Documentation

◆ AllBlockFilterTypes()

const std::set< BlockFilterType > & AllBlockFilterTypes ( )

Get a list of known filter types.

Definition at line 166 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ BasicFilterElements()

GCSFilter::ElementSet BasicFilterElements ( const CBlock & block,
const CBlockUndo & block_undo )
static

Definition at line 187 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ BlockFilterTypeByName()

bool BlockFilterTypeByName ( std::string_view name,
BlockFilterType & filter_type )

Find a filter type by its human-readable name.

Definition at line 155 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ BlockFilterTypeName()

const std::string & BlockFilterTypeName ( BlockFilterType filter_type)

Get the human-readable name for a filter type.

Returns empty string for unknown types.

Definition at line 148 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ Join()

template<typename C, typename S, typename UnaryOp>
auto util::Join ( const C & container,
const S & separator,
UnaryOp unary_op )

Join all container items.

Typically used to concatenate strings but accepts containers with elements of any type.

Parameters
containerThe items to join
separatorThe separator
unary_opApply this operator to each item

Definition at line 205 of file string.h.

Here is the caller graph for this function:

◆ ListBlockFilterTypes()

const std::string & ListBlockFilterTypes ( )

Get a comma-separated list of known filter type names.

Definition at line 180 of file blockfilter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_filter_types

const std::map<BlockFilterType, std::string> g_filter_types
static
Initial value:

Definition at line 22 of file blockfilter.cpp.