fix some compile errors

This commit is contained in:
Ethan Buchman 2017-12-03 18:01:17 -05:00 committed by Jae Kwon
parent 7a9014fcaf
commit 51f522f8d8
3 changed files with 7 additions and 7 deletions

View File

@ -20,10 +20,10 @@ type cacheMultiStore struct {
func newCacheMultiStore(rs *rootMultiStore) cacheMultiStore {
cms := cacheMultiStore{
db: db.CacheWrap(),
version: rs.version,
db: dbm.CacheWrap(),
version: rs.curVersion,
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 {
cms.substores[name] = substore.CacheWrap().(cwWriter)
@ -44,8 +44,8 @@ func (cms cacheMultiStore) CurrentVersion() int64 {
// Implements CacheMultiStore
func (cms cacheMultiStore) Write() {
cms.db.Write()
for substore := range rs.substores {
substore.(cwWriter).Write()
for substore := range cms.substores {
substore.Write()
}
}

View File

@ -99,7 +99,7 @@ type IAVLStore struct {
}
// 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
return i
}

View File

@ -132,7 +132,7 @@ func (rs *rootMultiStore) LoadVersion(ver int64) error {
}
// Commits each substore and gets commitState.
func (rs *RootMultiStore) doCommit() commitState {
func (rs *rootMultiStore) doCommit() commitState {
version := rs.curVersion
lastHash := rs.LastHash
substores := make([]substore, len(rs.substores))