MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / contains

Method contains

src/bloom.cpp:85–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85bool CBloomFilter::contains(const std::vector<unsigned char>& vKey) const
86{
87 if (isFull)
88 return true;
89 if (isEmpty)
90 return false;
91 for (unsigned int i = 0; i < nHashFuncs; i++)
92 {
93 unsigned int nIndex = Hash(i, vKey);
94 // Checks bit nIndex of vData
95 if (!(vData[nIndex >> 3] & (1 << (7 & nIndex))))
96 return false;
97 }
98 return true;
99}
100
101bool CBloomFilter::contains(const COutPoint& outpoint) const
102{

Callers 15

EXCLUSIVE_LOCKS_REQUIREDFunction · 0.45
ProcessMessageFunction · 0.45
SendMessagesMethod · 0.45
CheckInputsFunction · 0.45
PushAddressMethod · 0.45
PushInventoryMethod · 0.45
GetMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
test_cacheFunction · 0.45
test_cache_eraseFunction · 0.45

Calls 6

RollingBloomHashFunction · 0.85
FastModFunction · 0.85
HashFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by 6

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
test_cacheFunction · 0.36
test_cache_eraseFunction · 0.36
test_cache_generationsFunction · 0.36