all: get rid of error when creating memory database (#16716)

* all: get rid of error when create mdb

* core: clean up variables definition

* all: inline mdb definition
This commit is contained in:
gary rong
2018-05-09 20:24:25 +08:00
committed by Péter Szilágyi
parent 5dbd8b42a9
commit 7beccb29be
48 changed files with 172 additions and 230 deletions

View File

@ -366,7 +366,7 @@ func testGetNodeData(t *testing.T, protocol int) {
t.Errorf("data hash mismatch: have %x, want %x", hash, want)
}
}
statedb, _ := ethdb.NewMemDatabase()
statedb := ethdb.NewMemDatabase()
for i := 0; i < len(data); i++ {
statedb.Put(hashes[i].Bytes(), data[i])
}
@ -468,7 +468,7 @@ func testDAOChallenge(t *testing.T, localForked, remoteForked bool, timeout bool
var (
evmux = new(event.TypeMux)
pow = ethash.NewFaker()
db, _ = ethdb.NewMemDatabase()
db = ethdb.NewMemDatabase()
config = &params.ChainConfig{DAOForkBlock: big.NewInt(1), DAOForkSupport: localForked}
gspec = &core.Genesis{Config: config}
genesis = gspec.MustCommit(db)