Revert "Handling of already canonical payloads (#4367)" (#4373)

This reverts commit df80b0d915.
This commit is contained in:
Giulio rebuffo 2022-06-05 16:07:36 +02:00 committed by GitHub
parent 4a5f97527b
commit dce6ac22d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)