Skip to content

Commit

Permalink
fixup! core: explorer: add bloom filter to duplicate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
eckter committed Oct 17, 2024
1 parent 7bd8551 commit fd943b2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class BloomFilter<T>(private val bitField: BitSet, private val nHash: Int) {
var hash = value.hashCode()
for (i in 0..nHash) {
if (!bitField.get(hash % bitField.size())) return false
hash = hash.hashCode()
}
return true
}
Expand Down

0 comments on commit fd943b2

Please sign in to comment.