Skip to content

Commit

Permalink
feat: try second attempt for payload from redis
Browse files Browse the repository at this point in the history
  • Loading branch information
blombern committed Feb 12, 2024
1 parent 0828ad7 commit 527599e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1542,9 +1542,9 @@ func (api *RelayAPI) handleGetPayload(w http.ResponseWriter, req *http.Request)
if err != nil || getPayloadResp == nil {
log.WithError(err).Warn("failed first attempt to get execution payload")

// Wait, then try again.
// Wait, then try again (this time from Redis)
time.Sleep(time.Duration(timeoutGetPayloadRetryMs) * time.Millisecond)
getPayloadResp, err = datastore.GetPayloadContents(uint64(slot), proposerPubkey.String(), blockHash.String())
getPayloadResp, err = api.datastore.GetGetPayloadResponse(log, uint64(slot), proposerPubkey.String(), blockHash.String())

if err != nil || getPayloadResp == nil {
// Still not found! Error out now.
Expand Down

0 comments on commit 527599e

Please sign in to comment.