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

Method insert

src/common/bloom.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void CBloomFilter::insert(Span<const unsigned char> vKey)
50{
51 if (vData.empty()) // Avoid divide-by-zero (CVE-2013-5700)
52 return;
53 for (unsigned int i = 0; i < nHashFuncs; i++)
54 {
55 unsigned int nIndex = Hash(i, vKey);
56 // Sets bit nIndex of vData
57 vData[nIndex >> 3] |= (1 << (7 & nIndex));
58 }
59}
60
61void CBloomFilter::insert(const COutPoint& outpoint)
62{

Callers 15

insert_script_headerFunction · 0.45
insert_cpp_headerFunction · 0.45
CatFunction · 0.45
AddUnbroadcastTxMethod · 0.45
addTransactionMethod · 0.45
DiscourageMethod · 0.45
AddTimeDataFunction · 0.45
RegisterLoadFunction · 0.45
UnserializeFunction · 0.45
scheduleMethod · 0.45
UpdateForDescendantsMethod · 0.45

Calls 7

insertFunction · 0.85
MakeUCharSpanFunction · 0.85
RollingBloomHashFunction · 0.85
FastRange32Function · 0.85
HashFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 6

add_coinFunction · 0.36
GetOpenFileDescriptorsFunction · 0.36
TESTFunction · 0.36
NewWritableFileMethod · 0.36
NewAppendableFileMethod · 0.36
RenameFileMethod · 0.36