Commit ed3a39fb authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

teleportr: Fix panic (#2744)

When `err` is nil, `IsRetryableError` panics.
parent 30c92669
---
'@eth-optimism/teleportr': patch
---
Fix panic
......@@ -352,6 +352,9 @@ func (d *Driver) SendTransaction(
subCtx, cancel := context.WithTimeout(ctx, 10*time.Second)
defer cancel()
err := d.cfg.L2Client.SendTransaction(subCtx, tx)
if err == nil {
return err
}
if !IsRetryableError(err) {
d.metrics.FailedTXSubmissions.WithLabelValues("permanent").Inc()
return backoff.Permanent(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment