Skip to content

Commit

Permalink
retry el block processing on failure (wait for execution)
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Jan 17, 2024
1 parent dcec87d commit 42fe4f2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pkg/coordinator/clients/execution/clientlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,21 @@ func (client *Client) runClientLogic() error {

select {
case updateNotification := <-client.updateChan:
err := client.processBlock(updateNotification.hash, updateNotification.number, nil, "notified")
var err error

retryCount := 0

for retryCount < 3 {
err = client.processBlock(updateNotification.hash, updateNotification.number, nil, "notified")
if err == nil {
break
}

retryCount++

time.Sleep(1 * time.Second)
}

if err != nil {
client.logger.Warnf("error processing execution block update: %v", err)
} else {
Expand Down

0 comments on commit 42fe4f2

Please sign in to comment.