Skip to content

Commit

Permalink
dont retry on a failed batch submission
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrajovic committed Mar 28, 2024
1 parent 965645c commit 0cdf0c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchestrator/inj_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ func (l *relayer) relayBatch(ctx context.Context, latestEthValset *peggytypes.Va

txHash, err := l.Ethereum.SendTransactionBatch(ctx, latestEthValset, oldestConfirmedBatch, confirmations)
if err != nil {
return err
// Returning an error here triggers retries which don't help much except risk a binary crash
// Better to warn the user and try again in the next loop interval
log.WithError(err).Warningln("failed to send outgoing tx batch to Ethereum")
return nil
}

l.Logger().WithField("tx_hash", txHash.Hex()).Infoln("sent outgoing tx batch to Ethereum")
Expand Down

0 comments on commit 0cdf0c8

Please sign in to comment.