Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
fixed timeout on CL (ledgerwatch#4836)
Browse files Browse the repository at this point in the history
* fixed timeout

* send response immediately wen dealing with SYNCING

* send response immediately wen dealing with SYNCING

* correct lvh for ACCEPTED

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
  • Loading branch information
Giulio2002 and giuliorebuffo committed Jul 27, 2022
1 parent 0db0095 commit 039b661
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/engine_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func convertPayloadStatus(x *remote.EnginePayloadStatus) map[string]interface{}
json := map[string]interface{}{
"status": x.Status.String(),
}
if x.LatestValidHash != nil {
if x.LatestValidHash != nil && x.Status != remote.EngineStatus_ACCEPTED {
json["latestValidHash"] = common.Hash(gointerfaces.ConvertH256ToHash(x.LatestValidHash))
}
if x.ValidationError != "" {
Expand Down
4 changes: 4 additions & 0 deletions eth/stagedsync/stage_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ func HeadersPOS(
}

if requestStatus == engineapi.New {
if payloadStatus != nil && cfg.hd.PayloadStatusCh != nil && payloadStatus.Status == remote.EngineStatus_SYNCING {
cfg.hd.PayloadStatusCh <- *payloadStatus
return nil
}
cfg.hd.SetPendingPayloadStatus(payloadStatus)
}

Expand Down

0 comments on commit 039b661

Please sign in to comment.