fixed finalized portion (#4181)

This commit is contained in:
Giulio rebuffo 2022-05-17 15:26:47 +02:00 committed by GitHub
parent eb614bca88
commit 01a98a4582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -470,15 +470,21 @@ func (s *EthBackendServer) EngineForkChoiceUpdatedV1(ctx context.Context, req *r
}, nil
}
payloadStatus := PayloadStatus{
Status: remote.EngineStatus_VALID,
}
if (forkChoice.HeadBlockHash != common.Hash{} || forkChoice.HeadBlockHash != common.Hash{}) {
log.Trace("[ForkChoiceUpdated] sending forkChoiceMessage", "head", forkChoice.HeadBlockHash)
s.requestList.AddForkChoiceRequest(&forkChoice)
payloadStatus := <-s.statusCh
payloadStatus = <-s.statusCh
log.Trace("[ForkChoiceUpdated] got reply", "payloadStatus", payloadStatus)
if payloadStatus.CriticalError != nil {
return nil, payloadStatus.CriticalError
}
}
// No need for payload building
if req.PayloadAttributes == nil || payloadStatus.Status != remote.EngineStatus_VALID {