From e7ebf62092705e144a05882f7622622153333848 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 23 Oct 2017 14:08:36 +0200 Subject: [PATCH] Remove empty check after iavl fixup --- example/dummy/persistent_dummy.go | 9 +-------- glide.lock | 8 ++++---- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/example/dummy/persistent_dummy.go b/example/dummy/persistent_dummy.go index de4aaa569..15fe150d5 100644 --- a/example/dummy/persistent_dummy.go +++ b/example/dummy/persistent_dummy.go @@ -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) } diff --git a/glide.lock b/glide.lock index d2dfc9a68..cc94dbd55 100644 --- a/glide.lock +++ b/glide.lock @@ -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