SIGN IN SIGN UP

chain/ethereum: OR-merge receipt requirements in EthereumLogFilter (#6558)

* chain/ethereum: add unit tests for EthereumLogFilter receipt merge

Cover all six insertion sites (from_data_sources arms, from_mapping,
extend) and assert OR semantics across the three internal collections
(contracts_and_events_graph, wildcard_events, events_with_topic_filters).

Tests use two assertion helpers (assert_from_data_sources_or_merges and
assert_extend_or_merges) parameterized over the match-arm or collection
variant. Each helper runs both insertion orders so order-independence
is verified per variant. The OR-semantics property test catches any
flag-sequence regression.

* chain/ethereum: OR-merge receipt requirements in EthereumLogFilter

Wrap the three EthereumLogFilter collections in MergeMap and MergeGraph
newtypes whose only mutators (or_insert / or_add_edge) OR-combine the
bool weight with any existing value at the same key. The inner HashMap
and GraphMap are private, so callers cannot bypass the merge by going
through HashMap::insert or GraphMap::add_edge.

When two handlers collide on the same filter key with differing receipt
flags, the merged value is now the logical OR rather than the last
write. Handlers that declared receipt: true now reliably receive
transaction receipts even when another handler at the same key declared
receipt: false.

* chain/ethereum: Remove obsolete topic-filter test TODO

Topic-filtered events are now covered by the receipt-merge tests, so the
stale TODO is no longer needed.
K
Krishnanand V P committed
bfe3b9deb231425b227bc48c85258ef4b2af703a
Parent: 1f577b1
Committed by GitHub <noreply@github.com> on 6/26/2026, 4:57:10 AM