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

Function ComputeFilter

src/test/util/blockfilter.cpp:14–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using node::UndoReadFromDisk;
13
14bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex* block_index, BlockFilter& filter)
15{
16 LOCK(::cs_main);
17
18 CBlock block;
19 if (!ReadBlockFromDisk(block, block_index->GetBlockPos(), Params().GetConsensus())) {
20 return false;
21 }
22
23 CBlockUndo block_undo;
24 if (block_index->nHeight > 0 && !UndoReadFromDisk(block_undo, block_index)) {
25 return false;
26 }
27
28 filter = BlockFilter(filter_type, block, block_undo);
29 return true;
30}
31

Callers 1

CheckFilterLookupsFunction · 0.85

Calls 4

ReadBlockFromDiskFunction · 0.85
UndoReadFromDiskFunction · 0.85
BlockFilterClass · 0.85
ParamsClass · 0.50

Tested by

no test coverage detected