Skip to content

Commit

Permalink
Problem: versiondb/memiavl don't compatible with upstream sdk (#588)
Browse files Browse the repository at this point in the history
* Problem: versiondb/memiavl don't compatible with upstream sdk

Solution:
- avoid api breaking change

* fix build
  • Loading branch information
yihuang committed Jul 22, 2024
1 parent 5972d50 commit 50f1fa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion store/cachemulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"cosmossdk.io/store/tracekv"
"cosmossdk.io/store/types"
dbm "github.com/cosmos/cosmos-db"
)

// storeNameCtxKey is the TraceContext metadata key that identifies
Expand Down Expand Up @@ -54,7 +55,7 @@ func NewFromKVStore(
// NewStore creates a new Store object from a mapping of store keys to
// CacheWrapper objects. Each CacheWrapper store is a branched store.
func NewStore(
stores map[types.StoreKey]types.CacheWrapper,
_ dbm.DB, stores map[types.StoreKey]types.CacheWrapper, _ map[string]types.StoreKey,
traceWriter io.Writer, traceContext types.TraceContext,
) Store {
return NewFromKVStore(stores, traceWriter, traceContext)
Expand Down
4 changes: 2 additions & 2 deletions store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func (rs *Store) CacheMultiStore() types.CacheMultiStore {
}
stores[k] = store
}
return cachemulti.NewStore(stores, rs.traceWriter, rs.getTracingContext())
return cachemulti.NewFromKVStore(stores, rs.traceWriter, rs.getTracingContext())
}

// CacheMultiStoreWithVersion is analogous to CacheMultiStore except that it
Expand Down Expand Up @@ -627,7 +627,7 @@ func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStor
cachedStores[key] = cacheStore
}

return cachemulti.NewStore(cachedStores, rs.traceWriter, rs.getTracingContext()), nil
return cachemulti.NewFromKVStore(cachedStores, rs.traceWriter, rs.getTracingContext()), nil
}

// GetStore returns a mounted Store for a given StoreKey. If the StoreKey does
Expand Down

0 comments on commit 50f1fa0

Please sign in to comment.