Skip to content

Commit

Permalink
fix submitter bug [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 7, 2024
1 parent 2d8fd40 commit a5f075c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions services/cctp-relayer/relayer/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package relayer

import (
"context"
"errors"
"fmt"
"sync"
"time"
Expand Down Expand Up @@ -304,11 +305,13 @@ func (c *CCTPRelayer) Run(parentCtx context.Context) error {
})

g.Go(func() error {
err := c.txSubmitter.Start(ctx)
if err != nil {
err = fmt.Errorf("could not start tx submitter: %w", err)
if !c.txSubmitter.Started() {
err := c.txSubmitter.Start(ctx)
if err != nil && !errors.Is(err, submitter.ErrSubmitterAlreadyStarted) {
return fmt.Errorf("could not start tx submitter: %w", err)
}
}
return err
return nil
})

g.Go(func() error {
Expand Down

0 comments on commit a5f075c

Please sign in to comment.