diff --git a/ldb/block.go b/ldb/block.go index d8e8c2fa..81980c7c 100644 --- a/ldb/block.go +++ b/ldb/block.go @@ -8,10 +8,10 @@ import ( "bytes" "encoding/binary" + "github.com/btcsuite/goleveldb/leveldb" "github.com/conformal/btcdb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "github.com/conformal/goleveldb/leveldb" ) // FetchBlockBySha - return a btcutil Block diff --git a/ldb/dbtest/dbtst.go b/ldb/dbtest/dbtst.go index 41e83cad..582168cd 100644 --- a/ldb/dbtest/dbtst.go +++ b/ldb/dbtest/dbtst.go @@ -4,8 +4,8 @@ package main import ( "fmt" - "github.com/conformal/goleveldb/leveldb" - "github.com/conformal/goleveldb/leveldb/opt" + "github.com/btcsuite/goleveldb/leveldb" + "github.com/btcsuite/goleveldb/leveldb/opt" ) type tst struct { diff --git a/ldb/leveldb.go b/ldb/leveldb.go index 8c7ab826..1e7fde4c 100644 --- a/ldb/leveldb.go +++ b/ldb/leveldb.go @@ -11,13 +11,12 @@ import ( "strconv" "sync" + "github.com/btcsuite/goleveldb/leveldb" + "github.com/btcsuite/goleveldb/leveldb/opt" "github.com/conformal/btcdb" "github.com/conformal/btclog" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - "github.com/conformal/goleveldb/leveldb" - "github.com/conformal/goleveldb/leveldb/cache" - "github.com/conformal/goleveldb/leveldb/opt" ) const ( @@ -197,11 +196,10 @@ func openDB(dbpath string, create bool) (pbdb btcdb.Db, err error) { } } - myCache := cache.NewEmptyCache() opts := &opt.Options{ - BlockCache: myCache, - MaxOpenFiles: 256, - Compression: opt.NoCompression, + BlockCacher: opt.DefaultBlockCacher, + Compression: opt.NoCompression, + OpenFilesCacher: opt.DefaultOpenFilesCacher, } switch dbversion { diff --git a/ldb/tx.go b/ldb/tx.go index 5a433c1f..00bd838d 100644 --- a/ldb/tx.go +++ b/ldb/tx.go @@ -8,9 +8,9 @@ import ( "bytes" "encoding/binary" + "github.com/btcsuite/goleveldb/leveldb" "github.com/conformal/btcdb" "github.com/conformal/btcwire" - "github.com/conformal/goleveldb/leveldb" ) type txUpdateObj struct {