Skip to content

Commit

Permalink
Disable blockstore bloom filter
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
  • Loading branch information
Jakub Sztandera committed Oct 21, 2020
1 parent 420ec18 commit 3a46c15
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/blockstore/blockstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ type GCLocker = blockstore.GCLocker

var NewGCLocker = blockstore.NewGCLocker
var NewGCBlockstore = blockstore.NewGCBlockstore
var DefaultCacheOpts = blockstore.DefaultCacheOpts
var ErrNotFound = blockstore.ErrNotFound

func DefaultCacheOpts() CacheOpts {
return CacheOpts{
HasBloomFilterSize: 0,
HasBloomFilterHashes: 0,
HasARCCacheSize: 512 << 10,
}
}

func CachedBlockstore(ctx context.Context, bs Blockstore, opts CacheOpts) (Blockstore, error) {
bs, err := blockstore.CachedBlockstore(ctx, bs, opts)
if err != nil {
Expand Down

0 comments on commit 3a46c15

Please sign in to comment.