From 8b357fe0510ee608f843a84294f6285bae3b4438 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 7 Oct 2024 17:49:48 +0800 Subject: [PATCH] skip --- modules/core/03-connection/types/genesis.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/core/03-connection/types/genesis.go b/modules/core/03-connection/types/genesis.go index ca7750b2374..fc6689a0704 100644 --- a/modules/core/03-connection/types/genesis.go +++ b/modules/core/03-connection/types/genesis.go @@ -2,7 +2,6 @@ package types import ( "fmt" - "strings" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/cosmos/ibc-go/v9/modules/core/exported" @@ -47,16 +46,14 @@ func (gs GenesisState) Validate() error { var maxSequence uint64 for i, conn := range gs.Connections { - sequence, err := ParseConnectionSequence(conn.Id) - if err != nil { - if conn.Id == exported.LocalhostConnectionID && strings.Contains(err.Error(), host.ErrInvalidID.Error()) { - continue + if conn.Id != exported.LocalhostConnectionID { + sequence, err := ParseConnectionSequence(conn.Id) + if err != nil { + return err + } + if sequence > maxSequence { + maxSequence = sequence } - return err - } - - if sequence > maxSequence { - maxSequence = sequence } if err := conn.ValidateBasic(); err != nil {