Skip to content

Commit

Permalink
More timeout prevention (#4839)
Browse files Browse the repository at this point in the history
* More timeout prevention

* Fix Hive tests
  • Loading branch information
yperbasis authored Jul 27, 2022
1 parent f927ac8 commit b42b4e2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions eth/stagedsync/stage_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,13 @@ func HeadersPOS(
}
}

if requestStatus == engineapi.New {
if payloadStatus != nil && cfg.hd.PayloadStatusCh != nil && payloadStatus.Status == remote.EngineStatus_SYNCING {
if requestStatus == engineapi.New && payloadStatus != nil {
if payloadStatus.Status == remote.EngineStatus_SYNCING || payloadStatus.Status == remote.EngineStatus_ACCEPTED || !useExternalTx {
cfg.hd.PayloadStatusCh <- *payloadStatus
return nil
} else {
// Let the stage loop run to the end so that the transaction is committed prior to replying to CL
cfg.hd.SetPendingPayloadStatus(payloadStatus)
}
cfg.hd.SetPendingPayloadStatus(payloadStatus)
}

return nil
Expand Down

0 comments on commit b42b4e2

Please sign in to comment.