Adjust to the new version of goleveldb.

(And yes, we do want vendoring for that... This is just the quick fix.)

Change-Id: I9d347a64d96de6b3390a0e35c8d466f14bb83e4e
This commit is contained in:
Bjoern Rabenstein 2014-12-10 18:04:29 +01:00
parent cf781eff37
commit afd864e7f4

View file

@ -17,7 +17,6 @@ import (
"encoding" "encoding"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
leveldb_cache "github.com/syndtr/goleveldb/leveldb/cache"
leveldb_filter "github.com/syndtr/goleveldb/leveldb/filter" leveldb_filter "github.com/syndtr/goleveldb/leveldb/filter"
leveldb_iterator "github.com/syndtr/goleveldb/leveldb/iterator" leveldb_iterator "github.com/syndtr/goleveldb/leveldb/iterator"
leveldb_opt "github.com/syndtr/goleveldb/leveldb/opt" leveldb_opt "github.com/syndtr/goleveldb/leveldb/opt"
@ -52,8 +51,7 @@ type LevelDBOptions struct {
// use. // use.
func NewLevelDB(o LevelDBOptions) (KeyValueStore, error) { func NewLevelDB(o LevelDBOptions) (KeyValueStore, error) {
options := &leveldb_opt.Options{ options := &leveldb_opt.Options{
Compression: leveldb_opt.SnappyCompression, BlockCacheCapacity: o.CacheSizeBytes,
BlockCache: leveldb_cache.NewLRUCache(o.CacheSizeBytes),
Filter: leveldb_filter.NewBloomFilter(10), Filter: leveldb_filter.NewBloomFilter(10),
} }