NewIAVLTree takes waldir

This commit is contained in:
Ethan Buchman 2016-11-22 20:44:41 -05:00
parent b200b82418
commit dc13ec05a1
2 changed files with 2 additions and 8 deletions

View File

@ -14,10 +14,7 @@ type DummyApplication struct {
} }
func NewDummyApplication() *DummyApplication { func NewDummyApplication() *DummyApplication {
state := merkle.NewIAVLTree( state := merkle.NewIAVLTree(0, ".", nil)
0,
nil,
)
return &DummyApplication{state: state} return &DummyApplication{state: state}
} }

View File

@ -36,10 +36,7 @@ func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication {
db := dbm.NewDB("dummy", "leveldb", dbDir) db := dbm.NewDB("dummy", "leveldb", dbDir)
lastBlock := LoadLastBlock(db) lastBlock := LoadLastBlock(db)
stateTree := merkle.NewIAVLTree( stateTree := merkle.NewIAVLTree(0, ".", db)
0,
db,
)
stateTree.Load(lastBlock.AppHash) stateTree.Load(lastBlock.AppHash)
log.Notice("Loaded state", "block", lastBlock.BlockHeight, "root", stateTree.Hash()) log.Notice("Loaded state", "block", lastBlock.BlockHeight, "root", stateTree.Hash())