fix some compile errors
This commit is contained in:
parent
7a9014fcaf
commit
51f522f8d8
|
@ -20,10 +20,10 @@ type cacheMultiStore struct {
|
||||||
|
|
||||||
func newCacheMultiStore(rs *rootMultiStore) cacheMultiStore {
|
func newCacheMultiStore(rs *rootMultiStore) cacheMultiStore {
|
||||||
cms := cacheMultiStore{
|
cms := cacheMultiStore{
|
||||||
db: db.CacheWrap(),
|
db: dbm.CacheWrap(),
|
||||||
version: rs.version,
|
version: rs.curVersion,
|
||||||
lastCommitID: rs.lastCommitID,
|
lastCommitID: rs.lastCommitID,
|
||||||
substores: make(map[string]cwwWriter), len(rs.substores),
|
substores: make(map[string]cwWriter, len(rs.substores)),
|
||||||
}
|
}
|
||||||
for name, substore := range rs.substores {
|
for name, substore := range rs.substores {
|
||||||
cms.substores[name] = substore.CacheWrap().(cwWriter)
|
cms.substores[name] = substore.CacheWrap().(cwWriter)
|
||||||
|
@ -44,8 +44,8 @@ func (cms cacheMultiStore) CurrentVersion() int64 {
|
||||||
// Implements CacheMultiStore
|
// Implements CacheMultiStore
|
||||||
func (cms cacheMultiStore) Write() {
|
func (cms cacheMultiStore) Write() {
|
||||||
cms.db.Write()
|
cms.db.Write()
|
||||||
for substore := range rs.substores {
|
for substore := range cms.substores {
|
||||||
substore.(cwWriter).Write()
|
substore.Write()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ type IAVLStore struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CacheWrap returns a wrapper around the current writable state
|
// CacheWrap returns a wrapper around the current writable state
|
||||||
func (i IAVLStore) CacheWrap() interface{} {
|
func (i IAVLStore) CacheWrap() CacheWriter {
|
||||||
// TODO: add CacheWrap to IAVLTree using new db stuff
|
// TODO: add CacheWrap to IAVLTree using new db stuff
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ func (rs *rootMultiStore) LoadVersion(ver int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commits each substore and gets commitState.
|
// Commits each substore and gets commitState.
|
||||||
func (rs *RootMultiStore) doCommit() commitState {
|
func (rs *rootMultiStore) doCommit() commitState {
|
||||||
version := rs.curVersion
|
version := rs.curVersion
|
||||||
lastHash := rs.LastHash
|
lastHash := rs.LastHash
|
||||||
substores := make([]substore, len(rs.substores))
|
substores := make([]substore, len(rs.substores))
|
||||||
|
|
Loading…
Reference in New Issue