From dce6ac22d03120e4d34ddcc11b68c0b8812ea784 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Sun, 5 Jun 2022 16:07:36 +0200 Subject: [PATCH] Revert "Handling of already canonical payloads (#4367)" (#4373) This reverts commit df80b0d9158575f1721ff7f0e5a326c5ab50b828. --- eth/stagedsync/stage_headers.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/eth/stagedsync/stage_headers.go b/eth/stagedsync/stage_headers.go index 7f260a9f03b..df5927a17d1 100644 --- a/eth/stagedsync/stage_headers.go +++ b/eth/stagedsync/stage_headers.go @@ -418,22 +418,6 @@ func handleNewPayload( return err } - isCanonicalHeader, err := rawdb.IsCanonicalHash(tx, headerHash) - if err != nil { - return err - } - - // If we already processed this block as canonical we return VALID and skip it. - if isCanonicalHeader { - if requestStatus == engineapi.New { - cfg.hd.PayloadStatusCh <- privateapi.PayloadStatus{ - Status: remote.EngineStatus_VALID, - LatestValidHash: rawdb.ReadHeadBlockHash(tx), - } - } - return nil - } - if existingCanonicalHash != (common.Hash{}) && headerHash == existingCanonicalHash { log.Info(fmt.Sprintf("[%s] New payload: previously received valid header", s.LogPrefix())) cfg.hd.BeaconRequestList.Remove(requestId)