Skip to content

Commit

Permalink
Merge pull request #475 from icon-project/fix/eth_nonce_issue
Browse files Browse the repository at this point in the history
fix: mutex unlock
  • Loading branch information
sherpalden authored Jan 17, 2025
2 parents b656423 + 91268e3 commit bfa17cd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions relayer/chains/evm/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
func (p *Provider) Route(ctx context.Context, message *providerTypes.Message, callback providerTypes.TxResponseFunc) error {
// lock here to prevent transcation replacement
p.routerMutex.Lock()
defer p.routerMutex.Unlock()

p.log.Info("starting to route message",
zap.String("src", message.Src),
Expand All @@ -38,7 +39,6 @@ func (p *Provider) Route(ctx context.Context, message *providerTypes.Message, ca

opts, err := p.GetTransationOpts(ctx)
if err != nil {
p.routerMutex.Unlock()
return fmt.Errorf("failed to get transaction options: %w", err)
}

Expand All @@ -48,7 +48,6 @@ func (p *Provider) Route(ctx context.Context, message *providerTypes.Message, ca
}

p.WaitForTxResult(ctx, tx, message.MessageKey(), callback)
p.routerMutex.Unlock()
return nil
}

Expand Down

0 comments on commit bfa17cd

Please sign in to comment.