| 415 | } |
| 416 | |
| 417 | bool 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 | |
| 437 | bool BlockFilterIndex::LookupFilterHashRange(int start_height, const CBlockIndex* stop_index, |
| 438 | std::vector<uint256>& hashes_out) const |