Skip to content

Commit 9ee27ce

Browse files
yihuangmmsqe
authored andcommitted
Problem: versiondb/memiavl don't compatible with upstream sdk (#588)
* Problem: versiondb/memiavl don't compatible with upstream sdk Solution: - avoid api breaking change * fix build
1 parent 67d990b commit 9ee27ce

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

store/cachemulti/store.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
"cosmossdk.io/store/tracekv"
99
"cosmossdk.io/store/types"
10+
dbm "github.com/cosmos/cosmos-db"
1011
)
1112

1213
// storeNameCtxKey is the TraceContext metadata key that identifies
@@ -55,7 +56,7 @@ func NewFromKVStore(
5556
// NewStore creates a new Store object from a mapping of store keys to
5657
// CacheWrapper objects. Each CacheWrapper store is a branched store.
5758
func NewStore(
58-
stores map[types.StoreKey]types.CacheWrapper,
59+
_ dbm.DB, stores map[types.StoreKey]types.CacheWrapper, _ map[string]types.StoreKey,
5960
traceWriter io.Writer, traceContext types.TraceContext,
6061
) Store {
6162
return NewFromKVStore(stores, traceWriter, traceContext)

store/rootmulti/store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ func (rs *Store) CacheMultiStore() types.CacheMultiStore {
577577
}
578578
stores[k] = store
579579
}
580-
return cachemulti.NewStore(stores, rs.traceWriter, rs.getTracingContext())
580+
return cachemulti.NewFromKVStore(stores, rs.traceWriter, rs.getTracingContext())
581581
}
582582

583583
// CacheMultiStoreWithVersion is analogous to CacheMultiStore except that it
@@ -639,7 +639,7 @@ func (rs *Store) CacheMultiStoreWithVersion(version int64) (types.CacheMultiStor
639639
cachedStores[key] = cacheStore
640640
}
641641

642-
return cachemulti.NewStore(cachedStores, rs.traceWriter, rs.getTracingContext()), nil
642+
return cachemulti.NewFromKVStore(cachedStores, rs.traceWriter, rs.getTracingContext()), nil
643643
}
644644

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

0 commit comments

Comments
 (0)