diff --git a/e2e/go.mod b/e2e/go.mod index 126f95a07eb..6dc29d102eb 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -24,7 +24,6 @@ require ( github.com/strangelove-ventures/interchaintest/v8 v8.2.1-0.20240419152858-c8b741617cd8 github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 golang.org/x/mod v0.20.0 google.golang.org/grpc v1.66.0 gopkg.in/yaml.v2 v2.4.0 @@ -237,6 +236,7 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 4237afacbec..cb8ab6ed9c1 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -6,6 +6,7 @@ import ( "fmt" "os" "path" + "slices" "strings" "sync" @@ -17,7 +18,6 @@ import ( test "github.com/strangelove-ventures/interchaintest/v8/testutil" testifysuite "github.com/stretchr/testify/suite" "go.uber.org/zap" - "golang.org/x/exp/slices" sdkmath "cosmossdk.io/math" diff --git a/go.mod b/go.mod index 89c4db16f3b..c717a630f6b 100644 --- a/go.mod +++ b/go.mod @@ -178,7 +178,7 @@ require ( go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect diff --git a/go.sum b/go.sum index 43cbd894041..2509eb4cd2a 100644 --- a/go.sum +++ b/go.sum @@ -1048,8 +1048,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/modules/core/05-port/types/router.go b/modules/core/05-port/types/router.go index 7b6b629f3ff..5c7014526f4 100644 --- a/modules/core/05-port/types/router.go +++ b/modules/core/05-port/types/router.go @@ -3,8 +3,7 @@ package types import ( "errors" "fmt" - - "golang.org/x/exp/maps" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -69,5 +68,12 @@ func (rtr *Router) Route(module string) (IBCModule, bool) { // Keys returns the keys of the routes map. func (rtr *Router) Keys() []string { - return maps.Keys(rtr.routes) + keys := make([]string, 0, len(rtr.routes)) + + for k := range rtr.routes { + keys = append(keys, k) + } + + sort.Strings(keys) + return keys }