Remove empty check after iavl fixup
This commit is contained in:
parent
a4443ddb0c
commit
e7ebf62092
|
@ -3,7 +3,6 @@ package dummy
|
|||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
@ -31,18 +30,13 @@ type PersistentDummyApplication struct {
|
|||
|
||||
func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication {
|
||||
name := "dummy"
|
||||
dbPath := path.Join(dbDir, name+".db")
|
||||
empty, _ := cmn.IsDirEmpty(dbPath)
|
||||
|
||||
db, err := dbm.NewGoLevelDB(name, dbDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
stateTree := iavl.NewVersionedTree(500, db)
|
||||
if !empty {
|
||||
stateTree.Load()
|
||||
}
|
||||
stateTree.Load()
|
||||
|
||||
return &PersistentDummyApplication{
|
||||
app: &DummyApplication{state: stateTree},
|
||||
|
@ -117,7 +111,6 @@ func (app *PersistentDummyApplication) InitChain(params types.RequestInitChain)
|
|||
|
||||
// Track the block hash and header information
|
||||
func (app *PersistentDummyApplication) BeginBlock(params types.RequestBeginBlock) {
|
||||
|
||||
// reset valset changes
|
||||
app.changes = make([]*types.Validator, 0)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
hash: 876bc65024f66612325ebafcedeb3e4d5014d46b339cf7583f1c00c6bac6e32c
|
||||
updated: 2017-10-18T11:59:44.724549502+02:00
|
||||
updated: 2017-10-23T14:04:02.596189966+02:00
|
||||
imports:
|
||||
- name: github.com/btcsuite/btcd
|
||||
version: b8df516b4b267acf2de46be593a9d948d1d2c420
|
||||
|
@ -63,7 +63,7 @@ imports:
|
|||
subpackages:
|
||||
- data
|
||||
- name: github.com/tendermint/iavl
|
||||
version: ff4ffa531df48509d51f0c16c2432f986eed9fcc
|
||||
version: 721710e7aa59f61dbfbf558943a207ba3fe6b926
|
||||
- name: github.com/tendermint/tmlibs
|
||||
version: 8e5266a9ef2527e68a1571f932db8228a331b556
|
||||
subpackages:
|
||||
|
@ -73,7 +73,7 @@ imports:
|
|||
- merkle
|
||||
- process
|
||||
- name: github.com/urfave/cli
|
||||
version: d70f47eeca3afd795160003bc6e28b001d60c67c
|
||||
version: 7bc6a0acffa589f415f88aca16cc1de5ffd66f9c
|
||||
- name: golang.org/x/crypto
|
||||
version: c7af5bf2638a1164f2eb5467c39c6cffbd13a02e
|
||||
subpackages:
|
||||
|
@ -121,7 +121,7 @@ imports:
|
|||
- tap
|
||||
- transport
|
||||
- name: gopkg.in/go-playground/validator.v9
|
||||
version: d529ee1b0f30352444f507cc6cdac96bfd12decc
|
||||
version: 6d8c18553ea1ac493d049edd6f102f52e618f085
|
||||
testImports:
|
||||
- name: github.com/davecgh/go-spew
|
||||
version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9
|
||||
|
|
Loading…
Reference in New Issue