Constructors

Synopses

Declared in <common/bloom.h>

Construct an empty filter with no data and no hash functions.

Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements Note that if the given parameters will result in a filter outside the bounds of the protocol limits, the filter created will be as close to the given parameters as possible within the protocol limits. This will apply if nFPRate is very low or nElements is unreasonably high. nTweak is a constant which is added to the seed value passed to the hash function It should generally always be a random value (and is largely only exposed for unit testing) nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)

CBloomFilter(
    unsigned int nElements,
    double nFPRate,
    unsigned int nTweak,
    unsigned char nFlagsIn);

Parameters

Name

Description

nElements

Expected number of elements the filter will hold.

nFPRate

Desired false‐positive rate.

nTweak

Constant added to the hash seed to randomize the filter.

nFlagsIn

One of the BLOOM_UPDATE_* flags controlling update behavior.

Created with MrDocs