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

Method blockFilterMatchesAny

src/node/interfaces.cpp:590–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 1

MatchesBlockMethod · 0.80

Calls 3

GetBlockFilterIndexFunction · 0.85
LookupFilterMethod · 0.80
MatchAnyMethod · 0.80

Tested by

no test coverage detected