Skip to content

Commit

Permalink
Revert "Handling of already canonical payloads (#4367)" (#4373)
Browse files Browse the repository at this point in the history
This reverts commit df80b0d.
  • Loading branch information
Giulio2002 authored Jun 5, 2022
1 parent 4a5f975 commit dce6ac2
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions eth/stagedsync/stage_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dce6ac2

Please sign in to comment.