diff options
| author | Roy Badami <[email protected]> | 2014-07-07 22:06:21 +0100 |
|---|---|---|
| committer | Roy Badami <[email protected]> | 2014-07-07 22:06:21 +0100 |
| commit | 96df327834af3b55918adfac9b3f65adfc960b3a (patch) | |
| tree | 8bd199df46ea6f39f7094c0e7db2185b4d3f5d6d /src/bloom.cpp | |
| parent | Show bitcoin quantities with full precision, even in the presence of trailing... (diff) | |
| parent | Merge pull request #4480 (diff) | |
| download | discoin-96df327834af3b55918adfac9b3f65adfc960b3a.tar.xz discoin-96df327834af3b55918adfac9b3f65adfc960b3a.zip | |
Merge remote-tracking branch 'upstream/master'
Conflicts:
src/qt/overviewpage.cpp
src/qt/transactiondesc.cpp
Diffstat (limited to 'src/bloom.cpp')
| -rw-r--r-- | src/bloom.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bloom.cpp b/src/bloom.cpp index 1bfcbd406..85a2ddc18 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -94,12 +94,19 @@ 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; } -bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx, const uint256& hash) +bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx) { bool fFound = false; // Match if the filter contains the hash of tx @@ -108,6 +115,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx, const uint256& ha return true; if (isEmpty) return false; + const uint256& hash = tx.GetHash(); if (contains(hash)) fFound = true; |