mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
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. |
||
|---|---|---|
| .. | ||
| corpus | ||
| txfetcher_fuzzer.go | ||
| txfetcher_test.go | ||