MCPcopy Create free account
hub / github.com/citp/BlockSci / possiblyContains

Method possiblyContains

tools/parser/bloom_filter.cpp:115–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool BloomFilter::possiblyContains(const uint8_t *item, int length) const {
116 auto hashValues = hash(item, length);
117
118 for (uint8_t n = 0; n < impData.m_numHashes; n++) {
119 auto bitPos = nthHash(n, hashValues[0], hashValues[1], impData.length);
120 if (!store.isSet(bitPos)) {
121 return false;
122 }
123 }
124
125 return true;
126}

Callers 1

findAddressMethod · 0.45

Calls 3

hashFunction · 0.85
nthHashFunction · 0.85
isSetMethod · 0.80

Tested by

no test coverage detected