adjust min bloom filter size

This commit is contained in:
vyzo 2021-02-28 21:40:26 +02:00
parent cae5ddce88
commit 99c6e4f48f

View File

@ -11,7 +11,7 @@ import (
)
const (
BloomFilterSize = 50_000_000
BloomFilterMinSize = 10_000_000
BloomFilterProbability = 0.01
)
@ -31,9 +31,9 @@ func NewBloomLiveSetEnv() (*BloomLiveSetEnv, error) {
}
func (e *BloomLiveSetEnv) NewLiveSet(name string, sizeHint int64) (LiveSet, error) {
size := int64(BloomFilterSize)
size := int64(BloomFilterMinSize)
for size < sizeHint {
size += BloomFilterSize
size += BloomFilterMinSize
}
salt := make([]byte, 4)