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

@ -53,8 +53,7 @@ func TestLDB_PutGet(t *testing.T) {
}
func TestMemoryDB_PutGet(t *testing.T) {
db, _ := ethdb.NewMemDatabase()
testPutGet(db, t)
testPutGet(ethdb.NewMemDatabase(), t)
}
func testPutGet(db ethdb.Database, t *testing.T) {
@ -131,8 +130,7 @@ func TestLDB_ParallelPutGet(t *testing.T) {
}
func TestMemoryDB_ParallelPutGet(t *testing.T) {
db, _ := ethdb.NewMemDatabase()
testParallelPutGet(db, t)
testParallelPutGet(ethdb.NewMemDatabase(), t)
}
func testParallelPutGet(db ethdb.Database, t *testing.T) {