diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-10 00:55:01 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-10 00:55:01 +0800 |
commit | 8560004f380dc688a1171ad5aeffa593aae41193 (patch) | |
tree | fea395acf042b51e97a86e2c4cbcf8c16b2912b7 /ethdb | |
parent | 9723191b19f6ddc12f0c3376ede7529b2d72e6a2 (diff) | |
parent | 676a0de58d3d7c508b0eeeff192d2095a46f7382 (diff) | |
download | dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar.gz dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar.bz2 dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar.lz dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar.xz dexon-8560004f380dc688a1171ad5aeffa593aae41193.tar.zst dexon-8560004f380dc688a1171ad5aeffa593aae41193.zip |
wip
Diffstat (limited to 'ethdb')
-rw-r--r-- | ethdb/database.go | 11 |
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 } |