Skip to content

Commit 8f3f94a

Browse files
committed
Revert "CBloomFilter::clear() method"
This reverts commit 8fbf039.
1 parent 98e84aa commit 8f3f94a

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

src/bloom.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ bool CBloomFilter::contains(const uint256& hash) const
9494
return contains(data);
9595
}
9696

97-
void CBloomFilter::clear()
98-
{
99-
vData.assign(vData.size(),0);
100-
isFull = false;
101-
isEmpty = true;
102-
}
103-
10497
bool CBloomFilter::IsWithinSizeConstraints() const
10598
{
10699
return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;

src/bloom.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ class CBloomFilter
7878
bool contains(const COutPoint& outpoint) const;
7979
bool contains(const uint256& hash) const;
8080

81-
void clear();
82-
8381
// True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
8482
// (catch a filter which was just deserialized which was too big)
8583
bool IsWithinSizeConstraints() const;

src/test/bloom_tests.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
4545
expected[i] = (char)vch[i];
4646

4747
BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
48-
49-
BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
50-
filter.clear();
51-
BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
5248
}
5349

5450
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)

0 commit comments

Comments
 (0)