From 4d5c0efbf7f3f3b4c4c519691ae18d01589b7c1e Mon Sep 17 00:00:00 2001 From: Daniel Gimenez <25278291+indanielo@users.noreply.github.com> Date: Mon, 18 Mar 2024 10:26:43 +0100 Subject: [PATCH] Fix new_heads Events Emission on Block Forks new_heads events were not correctly emitted during block forks. This fix ensures accurate event generation and emission in fork scenarios. --- eth/stagedsync/stage_finish.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/stagedsync/stage_finish.go b/eth/stagedsync/stage_finish.go index a90be80bc37..212baa2aedf 100644 --- a/eth/stagedsync/stage_finish.go +++ b/eth/stagedsync/stage_finish.go @@ -143,8 +143,8 @@ func NotifyNewHeaders(ctx context.Context, finishStageBeforeSync uint64, finishS heightSpan = 1024 } notifyFrom = finishStageAfterSync - heightSpan + notifyFrom++ } - notifyFrom++ var notifyTo = notifyFrom var notifyToHash libcommon.Hash