@@ -54,7 +54,7 @@ class CBloomFilter
54
54
unsigned int Hash (unsigned int nHashNum, const std::vector<unsigned char >& vDataToHash) const ;
55
55
56
56
// Private constructor for CRollingBloomFilter, no restrictions on size
57
- CBloomFilter (unsigned int nElements, double nFPRate, unsigned int nTweak);
57
+ CBloomFilter (const unsigned int nElements, const double nFPRate, const unsigned int nTweak);
58
58
friend class CRollingBloomFilter ;
59
59
60
60
public:
@@ -67,7 +67,7 @@ class CBloomFilter
67
67
* It should generally always be a random value (and is largely only exposed for unit testing)
68
68
* nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)
69
69
*/
70
- CBloomFilter (unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
70
+ CBloomFilter (const unsigned int nElements, const double nFPRate, const unsigned int nTweak, unsigned char nFlagsIn);
71
71
CBloomFilter () : isFull(true ), isEmpty(false ), nHashFuncs(0 ), nTweak(0 ), nFlags(0 ) {}
72
72
73
73
ADD_SERIALIZE_METHODS;
@@ -89,7 +89,7 @@ class CBloomFilter
89
89
bool contains (const uint256& hash) const ;
90
90
91
91
void clear ();
92
- void reset (unsigned int nNewTweak);
92
+ void reset (const unsigned int nNewTweak);
93
93
94
94
// ! True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
95
95
// ! (catch a filter which was just deserialized which was too big)
@@ -122,7 +122,7 @@ class CRollingBloomFilter
122
122
// A random bloom filter calls GetRand() at creation time.
123
123
// Don't create global CRollingBloomFilter objects, as they may be
124
124
// constructed before the randomizer is properly initialized.
125
- CRollingBloomFilter (unsigned int nElements, double nFPRate);
125
+ CRollingBloomFilter (const unsigned int nElements, const double nFPRate);
126
126
127
127
void insert (const std::vector<unsigned char >& vKey);
128
128
void insert (const uint256& hash);
0 commit comments