diff --git a/eth/backend.go b/eth/backend.go index be2d03283..75e0e737b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -200,10 +200,13 @@ func makeExtraData(extra []byte) []byte { // CreateDB creates the chain database. func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Database, error) { db, err := ctx.OpenDatabase(name, config.DatabaseCache, config.DatabaseHandles) + if err != nil { + return nil, err + } if db, ok := db.(*ethdb.LDBDatabase); ok { db.Meter("eth/db/chaindata/") } - return db, err + return db, nil } // CreateConsensusEngine creates the required type of consensus engine instance for an Ethereum service