go-ethereum/eth/fetcher
Csaba Kiraly b0a266d3c8 eth/fetcher: add onRequestLatency callback to tx fetcher
Adds an optional onRequestLatency(peer, latency) callback to the tx
fetcher constructor, fired exactly once per request:

- On in-time delivery: the actual round-trip latency (clock.Now - req.time).
- On timeout (req.time + txFetchTimeout exceeded): the timeout value
  itself, so slow peers contribute samples instead of being silently
  omitted from the downstream EMA.

Late deliveries for requests already counted as timeouts do not
double-record. Existing callers (handler.go, fuzzer, tests) pass nil
for the new parameter; handler wiring to txTracker follows in a
separate commit.
2026-04-20 09:07:04 +02:00
..
metrics.go eth: check for tx on chain as well (#33607) 2026-02-24 11:21:03 +01:00
tx_fetcher.go eth/fetcher: add onRequestLatency callback to tx fetcher 2026-04-20 09:07:04 +02:00
tx_fetcher_test.go eth/fetcher: add onRequestLatency callback to tx fetcher 2026-04-20 09:07:04 +02:00