From 7beccb29becf439df7bf4c033a94c019ad25bead Mon Sep 17 00:00:00 2001 From: gary rong Date: Wed, 9 May 2018 20:24:25 +0800 Subject: 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 --- core/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/genesis.go') diff --git a/core/genesis.go b/core/genesis.go index c0a636ab2..9190e2ba2 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -222,7 +222,7 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig { // to the given database (or discards it if nil). func (g *Genesis) ToBlock(db ethdb.Database) *types.Block { if db == nil { - db, _ = ethdb.NewMemDatabase() + db = ethdb.NewMemDatabase() } statedb, _ := state.New(common.Hash{}, state.NewDatabase(db)) for addr, account := range g.Alloc { -- cgit v1.2.3