aboutsummaryrefslogtreecommitdiff
path: root/src/bloom.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bloom.h')
-rw-r--r--src/bloom.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bloom.h b/src/bloom.h
index 5ad727c330..7ca9682239 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -54,7 +54,7 @@ private:
unsigned int Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const;
// Private constructor for CRollingBloomFilter, no restrictions on size
- CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak);
+ CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak);
friend class CRollingBloomFilter;
public:
@@ -67,7 +67,7 @@ public:
* 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);
+ CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak, unsigned char nFlagsIn);
CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
ADD_SERIALIZE_METHODS;
@@ -89,7 +89,7 @@ public:
bool contains(const uint256& hash) const;
void clear();
- void reset(unsigned int nNewTweak);
+ void reset(const unsigned int nNewTweak);
//! True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
//! (catch a filter which was just deserialized which was too big)
@@ -122,7 +122,7 @@ public:
// A random bloom filter calls GetRand() at creation time.
// Don't create global CRollingBloomFilter objects, as they may be
// constructed before the randomizer is properly initialized.
- CRollingBloomFilter(unsigned int nElements, double nFPRate);
+ CRollingBloomFilter(const unsigned int nElements, const double nFPRate);
void insert(const std::vector<unsigned char>& vKey);
void insert(const uint256& hash);