| 405 | } |
| 406 | |
| 407 | bool 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 | |
| 427 | bool BlockFilterIndex::LookupFilterHashRange(int start_height, const CBlockIndex* stop_index, |
| 428 | std::vector<uint256>& hashes_out) const |