aboutsummaryrefslogtreecommitdiff
path: root/src/bloom.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-07-27 18:58:00 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2015-07-27 19:09:39 +0200
commitd741371d7d27e228aa64c618c50b23fb5449c3e1 (patch)
tree0b292baaaabe5f9148db4813dad82c893dd04434 /src/bloom.h
parentd2d7ee0e863b286e1c9f9c54659d494fb0a7712d (diff)
Only use randomly created nonces in CRollingBloomFilter.
Diffstat (limited to 'src/bloom.h')
-rw-r--r--src/bloom.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bloom.h b/src/bloom.h
index 12bf6d99a8..a4dba8cb4f 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -116,15 +116,17 @@ public:
class CRollingBloomFilter
{
public:
- CRollingBloomFilter(unsigned int nElements, double nFPRate,
- unsigned int nTweak = 0);
+ // 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);
void insert(const std::vector<unsigned char>& vKey);
void insert(const uint256& hash);
bool contains(const std::vector<unsigned char>& vKey) const;
bool contains(const uint256& hash) const;
- void reset(unsigned int nNewTweak = 0);
+ void reset();
private:
unsigned int nBloomSize;