Skip to content

Commit

Permalink
skip
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 7, 2024
1 parent e2a8bad commit 8b357fe
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions modules/core/03-connection/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8b357fe

Please sign in to comment.