From 0cdf0c8c18f4a9e306961383b4fd64ff43ba53e2 Mon Sep 17 00:00:00 2001 From: Dusan Brajovic Date: Thu, 28 Mar 2024 12:48:19 +0100 Subject: [PATCH] dont retry on a failed batch submission --- orchestrator/inj_relayer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orchestrator/inj_relayer.go b/orchestrator/inj_relayer.go index 2defe3e7..5171cafa 100644 --- a/orchestrator/inj_relayer.go +++ b/orchestrator/inj_relayer.go @@ -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")