Skip to content

Commit

Permalink
adding AllowResubmit config to chain
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Dec 21, 2023
1 parent 24b92c8 commit 71a3c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/config/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type EVMChain struct {
RPC *ethclient.Client `fig:"-"`
RPCURL string `fig:"rpc,required"`
ChainID *big.Int `fig:"chain_id,required"`
AllowResubmit bool `fig:"allow_resubmit"`
}

func NewEVMer(getter kv.Getter) EVMer {
Expand Down
6 changes: 4 additions & 2 deletions internal/services/relayer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ func (c *Service) StateRelay(ctx context.Context, state string, chainName string
return "", ErrEntryNotFound
}

if err := c.checkTransitionNotExist(ctx, state, chainName); err != nil {
return "", err
if !chain.AllowResubmit {
if err := c.checkTransitionNotExist(ctx, state, chainName); err != nil {
return "", err
}
}

return c.processIdentityStateTransfer(ctx, chain, entry, waitTxConfirm)
Expand Down

0 comments on commit 71a3c27

Please sign in to comment.