From 8a47abd98b3dd2b39fe1815dd3c6f5b776424950 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 14 Aug 2018 10:57:11 +0200 Subject: [PATCH] Merge #13948: trivial: Removes unsed `CBloomFilter` constructor. 265bd50884ac1984c08f0e5916256d5f12e655f5 Removes unsed `CBloomFilter` constructor. (251) Pull request description: This pull request removes the `CBloomFilter::CBloomFilter(const unsigned int, const double, const unsigned int)` constructor, which became obsolete with 086ee67. Tree-SHA512: 46742f178e219661e82609a9bf6b644ebc58ab3efc2d1865c5562980e84f16a5fa286be9813738196ad7a27e639dee926062538eb44cadd67ab87ad5e9a266ba # Conflicts: # src/bloom.h --- src/bloom.cpp | 11 ----------- src/bloom.h | 4 ---- 2 files changed, 15 deletions(-) diff --git a/src/bloom.cpp b/src/bloom.cpp index fbf0313388..2723c32e9a 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -42,17 +42,6 @@ CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, c { } -// Private constructor used by CRollingBloomFilter -CBloomFilter::CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweakIn) : - vData((unsigned int)(-1 / LN2SQUARED * nElements * log(nFPRate)) / 8), - isFull(false), - isEmpty(true), - nHashFuncs((unsigned int)(vData.size() * 8 / nElements * LN2)), - nTweak(nTweakIn), - nFlags(BLOOM_UPDATE_NONE) -{ -} - inline unsigned int CBloomFilter::Hash(unsigned int nHashNum, const std::vector& vDataToHash) const { // 0xFBA4C795 chosen as it guarantees a reasonable bit difference between nHashNum values. diff --git a/src/bloom.h b/src/bloom.h index ecb3c75599..e808a265fe 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -55,10 +55,6 @@ private: unsigned int Hash(unsigned int nHashNum, const std::vector& vDataToHash) const; - // Private constructor for CRollingBloomFilter, no restrictions on size - CBloomFilter(const unsigned int nElements, const double nFPRate, const unsigned int nTweak); - friend class CRollingBloomFilter; - // Check matches for arbitrary script data elements bool CheckScript(const CScript& script) const; // Check additional matches for special transactions