diff options
| author | Pieter Wuille <[email protected]> | 2014-06-09 10:02:00 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-06-22 00:06:17 +0200 |
| commit | d38da59bf68fbb37535e2579bfb7355a16baed0e (patch) | |
| tree | fb9821f60f32fa8ea0564d1149fa37ab396ead97 /src/bloom.cpp | |
| parent | Add CMutableTransaction and make CTransaction immutable. (diff) | |
| download | discoin-d38da59bf68fbb37535e2579bfb7355a16baed0e.tar.xz discoin-d38da59bf68fbb37535e2579bfb7355a16baed0e.zip | |
Code simplifications after CTransaction::GetHash() caching
Diffstat (limited to 'src/bloom.cpp')
| -rw-r--r-- | src/bloom.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bloom.cpp b/src/bloom.cpp index 1bfcbd406..26e366179 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -99,7 +99,7 @@ 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 +108,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; |