Skip to content

Commit

Permalink
dropped DenebPlus redundant check + nit
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed Oct 14, 2024
1 parent 4a76df8 commit 23e8ed9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions mod/execution/pkg/client/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func (s *EngineClient[
s.metrics.incrementNewPayloadTimeout()
}
return nil, s.handleRPCError(err)
} else if result == nil {
}
if result == nil {
return nil, engineerrors.ErrNilPayloadStatus
}

Expand Down Expand Up @@ -116,7 +117,8 @@ func (s *EngineClient[
s.metrics.incrementForkchoiceUpdateTimeout()
}
return nil, nil, s.handleRPCError(err)
} else if result == nil {
}
if result == nil {
return nil, nil, engineerrors.ErrNilForkchoiceResponse
}

Expand Down Expand Up @@ -149,16 +151,16 @@ func (s *EngineClient[

// Call and check for errors.
result, err := s.Client.GetPayload(cctx, payloadID, forkVersion)
switch {
case err != nil:
if err != nil {
if errors.Is(err, engineerrors.ErrEngineAPITimeout) {
s.metrics.incrementGetPayloadTimeout()
}
return result, s.handleRPCError(err)
case result == nil:
}
if result == nil {
return result, engineerrors.ErrNilExecutionPayloadEnvelope
case result.GetBlobsBundle() == nil &&
((forkVersion >= version.Deneb) || (forkVersion >= version.DenebPlus)):
}
if (forkVersion >= version.Deneb) && result.GetBlobsBundle() == nil {
return result, engineerrors.ErrNilBlobsBundle
}

Expand Down

0 comments on commit 23e8ed9

Please sign in to comment.