Error is correctly returned

This commit is contained in:
Jakub Matys 2018-10-16 13:35:50 +02:00
parent 942276ec86
commit b5a8cd2fc5

View File

@ -88,6 +88,9 @@ func NewRocksDB(path string, cacheSize, maxOpenFiles int, parser bchain.BlockCha
glog.Infof("rocksdb: opening %s, required data version %v, cache size %v, max open files %v", path, dbVersion, cacheSize, maxOpenFiles)
c := gorocksdb.NewLRUCache(cacheSize)
db, cfh, err := openDB(path, c, maxOpenFiles)
if err != nil {
return nil, err
}
wo := gorocksdb.NewDefaultWriteOptions()
ro := gorocksdb.NewDefaultReadOptions()
return &RocksDB{path, db, wo, ro, cfh, parser, nil, metrics, c, maxOpenFiles, connectBlockStats{}}, nil