Skip to content

Commit

Permalink
return err if ValidateChain fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed May 16, 2024
1 parent 23a1ff2 commit 3ba0e19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion turbo/engineapi/engine_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,11 @@ func (e *EngineServer) HandleNewPayload(
}

status, _, latestValidHash, err := e.chainRW.ValidateChain(ctx, headerHash, headerNumber)
if err != nil || status == execution.ExecutionStatus_Busy || status == execution.ExecutionStatus_TooFarAway {
if err != nil {
return nil, err
}

if status == execution.ExecutionStatus_Busy || status == execution.ExecutionStatus_TooFarAway {
e.logger.Debug(fmt.Sprintf("[%s] New payload: Client is still syncing", logPrefix))
return &engine_types.PayloadStatus{Status: engine_types.SyncingStatus}, nil
} else {
Expand Down

0 comments on commit 3ba0e19

Please sign in to comment.