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

Method LookupFilterRange

src/index/blockfilterindex.cpp:417–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417bool BlockFilterIndex::LookupFilterRange(int start_height, const CBlockIndex* stop_index,
418 std::vector<BlockFilter>& filters_out) const
419{
420 std::vector<DBVal> entries;
421 if (!LookupRange(*m_db, m_name, start_height, stop_index, entries)) {
422 return false;
423 }
424
425 filters_out.resize(entries.size());
426 auto filter_pos_it = filters_out.begin();
427 for (const auto& entry : entries) {
428 if (!ReadFilterFromDisk(entry.pos, *filter_pos_it)) {
429 return false;
430 }
431 ++filter_pos_it;
432 }
433
434 return true;
435}
436
437bool BlockFilterIndex::LookupFilterHashRange(int start_height, const CBlockIndex* stop_index,
438 std::vector<uint256>& hashes_out) const

Callers 3

ProcessGetCFiltersMethod · 0.80
CheckFilterLookupsFunction · 0.80
BOOST_FIXTURE_TEST_CASEFunction · 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