aboutsummaryrefslogtreecommitdiffstats
path: root/node
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-06-23 15:56:30 +0800
committerFelix Lange <fjl@twurst.com>2017-06-23 15:56:30 +0800
commit01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec (patch)
tree6ef55376df5a406d5b1771423f1c51659a52b8cc /node
parentd40179f882f00e8c8c992ebc5b0bed937090e90c (diff)
downloadgo-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar.gz
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar.bz2
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar.lz
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar.xz
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.tar.zst
go-tangerine-01c9cf1cb5ed1f55bb6bc87c5ce18a818c5c6cec.zip
node: don't return non-nil database on error
Diffstat (limited to 'node')
-rw-r--r--node/service.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/node/service.go b/node/service.go
index 5e1eb0e64..55062a500 100644
--- a/node/service.go
+++ b/node/service.go
@@ -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