| 588 | return GetBlockFilterIndex(filter_type) != nullptr; |
| 589 | } |
| 590 | std::optional<bool> blockFilterMatchesAny(BlockFilterType filter_type, const uint256& block_hash, const GCSFilter::ElementSet& filter_set) override |
| 591 | { |
| 592 | const BlockFilterIndex* block_filter_index{GetBlockFilterIndex(filter_type)}; |
| 593 | if (!block_filter_index) return std::nullopt; |
| 594 | |
| 595 | BlockFilter filter; |
| 596 | const CBlockIndex* index{WITH_LOCK(::cs_main, return chainman().m_blockman.LookupBlockIndex(block_hash))}; |
| 597 | if (index == nullptr || !block_filter_index->LookupFilter(index, filter)) return std::nullopt; |
| 598 | return filter.GetFilter().MatchAny(filter_set); |
| 599 | } |
| 600 | bool findBlock(const uint256& hash, const FoundBlock& block) override |
| 601 | { |
| 602 | WAIT_LOCK(cs_main, lock); |
no test coverage detected