Bitcoin Core  0.19.99
P2P Digital Currency
Functions | Variables
blockfilter.cpp File Reference
#include <mutex>
#include <sstream>
#include <blockfilter.h>
#include <crypto/siphash.h>
#include <hash.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <streams.h>
Include dependency graph for blockfilter.cpp:

Go to the source code of this file.

Functions

template<typename OStream >
static void GolombRiceEncode (BitStreamWriter< OStream > &bitwriter, uint8_t P, uint64_t x)
 
template<typename IStream >
static uint64_t GolombRiceDecode (BitStreamReader< IStream > &bitreader, uint8_t P)
 
static uint64_t MapIntoRange (uint64_t x, uint64_t n)
 
const std::string & BlockFilterTypeName (BlockFilterType filter_type)
 Get the human-readable name for a filter type. More...
 
bool BlockFilterTypeByName (const std::string &name, BlockFilterType &filter_type)
 Find a filter type by its human-readable name. More...
 
const std::vector< BlockFilterType > & AllBlockFilterTypes ()
 Get a list of known filter types. More...
 
const std::string & ListBlockFilterTypes ()
 Get a comma-separated list of known filter type names. More...
 
static GCSFilter::ElementSet BasicFilterElements (const CBlock &block, const CBlockUndo &block_undo)
 

Variables

static constexpr int GCS_SER_TYPE = SER_NETWORK
 SerType used to serialize parameters in GCS filter encoding. More...
 
static constexpr int GCS_SER_VERSION = 0
 Protocol version used to serialize parameters in GCS filter encoding. More...
 
static const std::map< BlockFilterType, std::string > g_filter_types
 

Function Documentation

◆ AllBlockFilterTypes()

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

Get a list of known filter types.

Definition at line 224 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ BasicFilterElements()

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

Definition at line 258 of file blockfilter.cpp.

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

◆ BlockFilterTypeByName()

bool BlockFilterTypeByName ( const std::string &  name,
BlockFilterType filter_type 
)

Find a filter type by its human-readable name.

Definition at line 214 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 207 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ GolombRiceDecode()

template<typename IStream >
static uint64_t GolombRiceDecode ( BitStreamReader< IStream > &  bitreader,
uint8_t  P 
)
static

Definition at line 43 of file blockfilter.cpp.

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

◆ GolombRiceEncode()

template<typename OStream >
static void GolombRiceEncode ( BitStreamWriter< OStream > &  bitwriter,
uint8_t  P,
uint64_t  x 
)
static

Definition at line 26 of file blockfilter.cpp.

Here is the call graph for this function:
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 239 of file blockfilter.cpp.

Here is the caller graph for this function:

◆ MapIntoRange()

static uint64_t MapIntoRange ( uint64_t  x,
uint64_t  n 
)
static

Definition at line 61 of file blockfilter.cpp.

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 21 of file blockfilter.cpp.

◆ GCS_SER_TYPE

constexpr int GCS_SER_TYPE = SER_NETWORK
static

SerType used to serialize parameters in GCS filter encoding.

Definition at line 16 of file blockfilter.cpp.

◆ GCS_SER_VERSION

constexpr int GCS_SER_VERSION = 0
static

Protocol version used to serialize parameters in GCS filter encoding.

Definition at line 19 of file blockfilter.cpp.