Skip to content

Commit

Permalink
chore(store/internal): use std maps (#21792)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilasxie authored Sep 18, 2024
1 parent f283f0c commit c29bfb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion store/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ require (
github.com/stretchr/testify v1.9.0
github.com/tidwall/btree v1.7.0
go.uber.org/mock v0.4.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
gotest.tools/v3 v3.5.1
Expand All @@ -48,6 +47,7 @@ require (
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/zerolog v1.33.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
Expand Down
8 changes: 3 additions & 5 deletions store/internal/proofs/helpers.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package proofs

import (
"sort"
"maps"
"slices"

cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
"golang.org/x/exp/maps"

"cosmossdk.io/math/unsafe"
sdkmaps "cosmossdk.io/store/internal/maps"
Expand Down Expand Up @@ -47,9 +47,7 @@ const (
)

func SortedKeys(data map[string][]byte) []string {
keys := maps.Keys(data)
sort.Strings(keys)
return keys
return slices.Sorted(maps.Keys(data))
}

func CalcRoot(data map[string][]byte) []byte {
Expand Down

0 comments on commit c29bfb7

Please sign in to comment.