mirror of https://github.com/status-im/nim-eth.git
make 'bloom.contains' public
This commit is contained in:
parent
3ddb498f2a
commit
2f37870b6b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue