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

Method reset

tools/parser/bloom_filter.cpp:52–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void BloomStore::reset(int64_t newLength) {
53 backingFile.truncate(0);
54 backingFile.truncate((newLength + BlockSize - 1) / BlockSize);
55 length = newLength;
56}
57
58int64_t calculateLength(int64_t maxItems, double fpRate) {
59 return static_cast<int64_t>(std::ceil(-(std::log(fpRate) * maxItems) / Log2Squared));

Callers

nothing calls this directly

Calls 2

BloomFilterDataClass · 0.85
truncateMethod · 0.45

Tested by

no test coverage detected