diff --git a/internal/config/evm.go b/internal/config/evm.go index 651e70a..ed032be 100644 --- a/internal/config/evm.go +++ b/internal/config/evm.go @@ -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 { diff --git a/internal/services/relayer/main.go b/internal/services/relayer/main.go index b9d70c6..822f9e8 100644 --- a/internal/services/relayer/main.go +++ b/internal/services/relayer/main.go @@ -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)