diff --git a/76.md b/76.md index 141f82c6..3b884714 100644 --- a/76.md +++ b/76.md @@ -34,7 +34,7 @@ Probabilistic permissions use bloom filters that include a set of pubkeys. They Bloom filters MUST use `SHA-256` functions of the key + iterating index as the psedocode below: ```js -class BloomFilter(size: Int, n: Int, buffer: ByteArray) { +class BloomFilter(size: Int, rounds: Int, buffer: ByteArray) { val bits = BitArray(buffer) fun bitIndex(value: ByteArray, index: Byte) { @@ -44,7 +44,7 @@ class BloomFilter(size: Int, n: Int, buffer: ByteArray) { fun add(pubkey: HexKey) { val value = pubkey.hexToByteArray() - for (index in 0..n) { + for (index in 0 until rounds) { bits[bitIndex(value, index)] = true } } @@ -52,7 +52,7 @@ class BloomFilter(size: Int, n: Int, buffer: ByteArray) { fun mightContains(pubkey: HexKey): Boolean { val value = pubkey.hexToByteArray() - for (index in 0..n) { + for (index in 0 until rounds) { if (!bits[bitIndex(value, index)]) { return false }