MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / insert

Method insert

src/commons/bloom.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void CBloomFilter::insert(const vector<uint8_t>& vKey) {
34 if (isFull)
35 return;
36 for (uint32_t i = 0; i < nHashFuncs; i++) {
37 uint32_t index = Hash(i, vKey);
38 // Sets bit index of vData
39 vData[index >> 3] |= (1 << (7 & index));
40 }
41 isEmpty = false;
42}
43
44void CBloomFilter::insert(const uint256& hash) {
45 vector<uint8_t> data(hash.begin(), hash.end());

Callers 15

LogPrintStrMethod · 0.45
RelayToMethod · 0.45
ProcessAlertMethod · 0.45
AppInitFunction · 0.45
SetMethod · 0.45
ReconsiderBlockIndexFunction · 0.45
AddToBlockIndexFunction · 0.45
CheckBlockFunction · 0.45
PushGetBlocksOnConditionFunction · 0.45
ProcessBlockFunction · 0.45
LoadBlockIndexDBFunction · 0.45
ThreadOpenConnectionsFunction · 0.45

Calls 3

HashFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.36