MCPcopy Create free account
hub / github.com/ElementsProject/elements / Hash

Method Hash

src/common/bloom.cpp:43–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43inline unsigned int CBloomFilter::Hash(unsigned int nHashNum, Span<const unsigned char> vDataToHash) const
44{
45 // 0xFBA4C795 chosen as it guarantees a reasonable bit difference between nHashNum values.
46 return MurmurHash3(nHashNum * 0xFBA4C795 + nTweak, vDataToHash) % (vData.size() * 8);
47}
48
49void CBloomFilter::insert(Span<const unsigned char> vKey)
50{

Callers

nothing calls this directly

Calls 2

MurmurHash3Function · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected