go-ethereum/eth/txtracker
Csaba Kiraly 72f8ef6f69 eth/txtracker: test reorg safety of head block lookup
handleChainHead resolves the head block via GetBlock(hash, number) so
that a stale head event after a reorg cannot credit transactions from
the wrong block. The existing mockChain ignored the hash argument, so a
regression to GetBlockByNumber would have gone undetected.

Make mockChain hash-aware: store blocks keyed by hash with a separate
canonical-by-number index for the finalization path, and have sendHead
emit the real block's hash. Add TestReorgSafety with two blocks at the
same height to exercise the hash selector directly.
2026-04-13 16:56:37 +02:00
..
tracker.go eth/txtracker: replace time.Sleep with deterministic step channel 2026-04-11 16:35:54 +02:00
tracker_test.go eth/txtracker: test reorg safety of head block lookup 2026-04-13 16:56:37 +02:00