make 'bloom.contains' public

This commit is contained in:
jangko 2020-09-30 11:01:50 +07:00
parent 3ddb498f2a
commit 2f37870b6b
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ proc incl(f: var BloomFilter, h: MDigest[256]) = # Should this be public?
proc incl*(f: var BloomFilter, v: string) = f.incl(keccak256.digest(v))
proc incl*(f: var BloomFilter, v: openarray[byte]) = f.incl(keccak256.digest(v))
proc contains(f: BloomFilter, h: MDigest[256]): bool = # Should this be public?
proc contains*(f: BloomFilter, h: MDigest[256]): bool =
for bits in bloomBits(h):
if (f.value and bits).isZero: return false
return true