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
@@ -568,7 +568,7 @@ func (n *Node) EventMux() *event.TypeMux {
|
||||
// ephemeral, a memory database is returned.
|
||||
func (n *Node) OpenDatabase(name string, cache, handles int) (ethdb.Database, error) {
|
||||
if n.config.DataDir == "" {
|
||||
return ethdb.NewMemDatabase()
|
||||
return ethdb.NewMemDatabase(), nil
|
||||
}
|
||||
return ethdb.NewLDBDatabase(n.config.resolvePath(name), cache, handles)
|
||||
}
|
||||
|
Reference in New Issue
Block a user