chore(store/internal): use std maps (#21792)
This commit is contained in:
parent
f283f0c978
commit
c29bfb7bf9
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user