Browse Source

NewIAVLTree takes waldir

pull/1780/head
Ethan Buchman 8 years ago
parent
commit
dc13ec05a1
2 changed files with 2 additions and 8 deletions
  1. +1
    -4
      example/dummy/dummy.go
  2. +1
    -4
      example/dummy/persistent_dummy.go

+ 1
- 4
example/dummy/dummy.go View File

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


+ 1
- 4
example/dummy/persistent_dummy.go View File

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


Loading…
Cancel
Save