Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Dec 16, 2024
1 parent b09d61e commit 31fb466
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ require (
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b
go.uber.org/mock v0.5.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
golang.org/x/sync v0.10.0
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1
google.golang.org/grpc v1.68.1
Expand Down Expand Up @@ -164,6 +163,7 @@ require (
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.12.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sys v0.28.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions store/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]

## v1.10.0 (December 13, 2024)

### Features

* [#22893](https://github.com/cosmos/cosmos-sdk/pull/22893) Support mount object store in baseapp, add `ObjectStore` api in context.

## v1.10.0 (December 13, 2024)

### Improvements

* [#22305](https://github.com/cosmos/cosmos-sdk/pull/22305) Add `LatestVersion` to the `Committer` interface to get the latest version of the store.
Expand Down
2 changes: 1 addition & 1 deletion store/gaskv/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (gs *GStore[V]) GetStoreType() types.StoreType {
return gs.parent.GetStoreType()
}

// Get implements types.KVStore.
// Get implements KVStore.
func (gs *GStore[V]) Get(key []byte) (value V) {
gs.gasMeter.ConsumeGas(gs.gasConfig.ReadCostFlat, types.GasReadCostFlatDesc)
value = gs.parent.Get(key)
Expand Down
1 change: 0 additions & 1 deletion store/rootmulti/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ func prepareStoreMap() (map[types.StoreKey]types.CommitStore, error) {
store.MountStoreWithDB(types.NewKVStoreKey("iavl1"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewTransientStoreKey("trans1"), types.StoreTypeTransient, nil)
store.MountStoreWithDB(types.NewMemoryStoreKey("mem1"), types.StoreTypeMemory, nil)
store.MountStoreWithDB(types.NewObjectStoreKey("obj1"), types.StoreTypeObject, nil)
if err := store.LoadLatestVersion(); err != nil {
return nil, err
Expand Down
7 changes: 1 addition & 6 deletions store/transient/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
_ types.ObjKVStore = (*ObjStore)(nil)
)

// Store is a wrapper for a MemDB with Commiter implementation
// Store is a wrapper for a MemDB with Committer implementation
type GStore[V any] struct {
internal.BTreeStore[V]
}
Expand Down Expand Up @@ -85,8 +85,3 @@ func (ts *GStore[V]) LatestVersion() int64 {
func (ts *GStore[V]) WorkingHash() []byte {
return []byte{}
}

// GetStoreType implements Store.
func (ts *GStore[V]) GetStoreType() types.StoreType {
return types.StoreTypeTransient
}
2 changes: 1 addition & 1 deletion types/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (c Context) TransientStore(key storetypes.StoreKey) storetypes.KVStore {
}

// ObjectStore fetches an object store from the MultiStore,
func (c Context) OjectStore(key storetypes.StoreKey) storetypes.ObjKVStore {
func (c Context) ObjectStore(key storetypes.StoreKey) storetypes.ObjKVStore {
return gaskv.NewObjStore(c.ms.GetObjKVStore(key), c.gasMeter, c.transientKVGasConfig)
}

Expand Down

0 comments on commit 31fb466

Please sign in to comment.