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 authored and alextes committed May 1, 2024
1 parent ba51d19 commit 4e9454f
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 @@ -1554,9 +1554,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 4e9454f

Please sign in to comment.