aboutsummaryrefslogtreecommitdiff
path: root/src/bloom.cpp
diff options
context:
space:
mode:
authorTom Harding <tomh@thinlink.com>2014-06-25 16:21:29 -0700
committerTom Harding <tomh@thinlink.com>2014-06-27 07:54:21 -0700
commit8fbf03995df9a2003be603be1a930bc3373d56e0 (patch)
treee726d2f0b835114c4aa5089813a60ed06971f46a /src/bloom.cpp
parent62599373883a66a958136f48ab0e2b826e3d5bf8 (diff)
CBloomFilter::clear() method
Diffstat (limited to 'src/bloom.cpp')
-rw-r--r--src/bloom.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bloom.cpp b/src/bloom.cpp
index 26e366179c..85a2ddc189 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -94,6 +94,13 @@ bool CBloomFilter::contains(const uint256& hash) const
return contains(data);
}
+void CBloomFilter::clear()
+{
+ vData.assign(vData.size(),0);
+ isFull = false;
+ isEmpty = true;
+}
+
bool CBloomFilter::IsWithinSizeConstraints() const
{
return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;