Skip to content

Commit 46b5240

Browse files
committed
Apply suggestions from code review
1 parent 69d1149 commit 46b5240

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

baseapp/baseapp.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
1414
"github.com/cometbft/cometbft/crypto/tmhash"
1515
"github.com/cosmos/gogoproto/proto"
16-
"golang.org/x/exp/maps"
1716
"google.golang.org/protobuf/reflect/protoreflect"
1817

1918
"cosmossdk.io/core/header"
@@ -336,7 +335,10 @@ func (app *BaseApp) MountTransientStores(keys map[string]*storetypes.TransientSt
336335
// MountMemoryStores mounts all in-memory KVStores with the BaseApp's internal
337336
// commit multi-store.
338337
func (app *BaseApp) MountMemoryStores(keys map[string]*storetypes.MemoryStoreKey) {
339-
skeys := maps.Keys(keys)
338+
skeys := make([]string, 0, len(keys))
339+
for key := range keys {
340+
skeys = append(skeys, key)
341+
}
340342
sort.Strings(skeys)
341343
for _, key := range skeys {
342344
memKey := keys[key]
@@ -347,7 +349,10 @@ func (app *BaseApp) MountMemoryStores(keys map[string]*storetypes.MemoryStoreKey
347349
// MountObjectStores mounts all transient object stores with the BaseApp's internal
348350
// commit multi-store.
349351
func (app *BaseApp) MountObjectStores(keys map[string]*storetypes.ObjectStoreKey) {
350-
skeys := maps.Keys(keys)
352+
skeys := make([]string, 0, len(keys))
353+
for key := range keys {
354+
skeys = append(skeys, key)
355+
}
351356
sort.Strings(skeys)
352357
for _, key := range skeys {
353358
memKey := keys[key]

store/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
3131
3232
## [Unreleased]
3333

34+
### Features
35+
36+
* [#22893](https://github.com/cosmos/cosmos-sdk/pull/22893) Support mount object store in baseapp, add `ObjectStore` api in context.
37+
3438
## v1.10.0 (December 13, 2024)
3539

3640
### Improvements

0 commit comments

Comments
 (0)