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:
committed by
Péter Szilágyi
parent
5dbd8b42a9
commit
7beccb29be
@ -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 {
|
||||
|
Reference in New Issue
Block a user