aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb/database.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethdb/database.go')
-rw-r--r--ethdb/database.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/ethdb/database.go b/ethdb/database.go
index f020af8f2..4e3d01da0 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -1,11 +1,10 @@
package ethdb
import (
- "path"
"fmt"
- "github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/compression/rle"
+ "github.com/ethereum/go-ethereum/ethutil"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
)
@@ -15,17 +14,13 @@ type LDBDatabase struct {
comp bool
}
-func NewLDBDatabase(name string) (*LDBDatabase, error) {
- dbPath := path.Join(ethutil.Config.ExecPath, name)
-
+func NewLDBDatabase(file string) (*LDBDatabase, error) {
// Open the db
- db, err := leveldb.OpenFile(dbPath, nil)
+ db, err := leveldb.OpenFile(file, nil)
if err != nil {
return nil, err
}
-
database := &LDBDatabase{db: db, comp: true}
-
return database, nil
}