MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / LookupFilterRange

Method LookupFilterRange

src/index/blockfilterindex.cpp:407–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407bool BlockFilterIndex::LookupFilterRange(int start_height, const CBlockIndex* stop_index,
408 std::vector<BlockFilter>& filters_out) const
409{
410 std::vector<DBVal> entries;
411 if (!LookupRange(*m_db, m_name, start_height, stop_index, entries)) {
412 return false;
413 }
414
415 filters_out.resize(entries.size());
416 auto filter_pos_it = filters_out.begin();
417 for (const auto& entry : entries) {
418 if (!ReadFilterFromDisk(entry.pos, entry.hash, *filter_pos_it)) {
419 return false;
420 }
421 ++filter_pos_it;
422 }
423
424 return true;
425}
426
427bool BlockFilterIndex::LookupFilterHashRange(int start_height, const CBlockIndex* stop_index,
428 std::vector<uint256>& hashes_out) const

Callers 4

ProcessGetCFiltersMethod · 0.80
CheckFilterLookupsFunction · 0.80
BOOST_FIXTURE_TEST_CASEFunction · 0.80
scanblocksFunction · 0.80

Calls 4

LookupRangeFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by 2

CheckFilterLookupsFunction · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64