good morning!!!!

Skip to content
Snippets Groups Projects
Commit 01c9cf1c authored by Felix Lange's avatar Felix Lange
Browse files

node: don't return non-nil database on error

parent d40179f8
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int) (et
if ctx.config.DataDir == "" {
return ethdb.NewMemDatabase()
}
return ethdb.NewLDBDatabase(ctx.config.resolvePath(name), cache, handles)
db, err := ethdb.NewLDBDatabase(ctx.config.resolvePath(name), cache, handles)
if err != nil {
return nil, err
}
return db, nil
}
// ResolvePath resolves a user path into the data directory if that was relative
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment