diff --git a/tines-core/src/bloom.rs b/tines-core/src/bloom.rs index ae19d7c..d1e6258 100644 --- a/tines-core/src/bloom.rs +++ b/tines-core/src/bloom.rs @@ -4,7 +4,7 @@ //! bit positions per inserted `ObservationId`. The `salt` value mixes into the //! hash so that the same id under different salts lands on different bit //! positions, keeping false positives between independent filters low. The -//! The hashing scheme is pinned (see [`positions`]) so that `tines-core` and the +//! hashing scheme is pinned (see [`positions`]) so that `tines-core` and the //! simulation agree bit-for-bit across builds. //! //! This type is `core`-only: it owns a fixed `[u8; SUMMARY_BYTES]` array and @@ -68,9 +68,9 @@ impl Bloom { /// `k` in `0..BLOOM_K`: /// ```text /// a = u64::from_le_bytes(id[0..8]) ^ (salt as u64).wrapping_mul(0x9E3779B97F4A7C15) -/// b = u64::from_le_bytes(id[8..16]) ^ (salt as u64).wrapping_mul(0xC2B2AE3D27D4EB4F) | 1 +/// b = u64::from_le_bytes(id[8..16]) ^ (salt as u64).wrapping_mul(0xC2B2AE3D27D4EB4F) /// h1 = fmix64(a) -/// h2 = fmix64(b) +/// h2 = fmix64(b) | 1 /// capacity = SUMMARY_BYTES * 8 /// bit_index = (h1 + k * h2) % capacity /// ``` diff --git a/tines-core/tests/common/mod.rs b/tines-core/tests/common/mod.rs index 50e9c89..288d1bc 100644 --- a/tines-core/tests/common/mod.rs +++ b/tines-core/tests/common/mod.rs @@ -1,6 +1,7 @@ //! Shared, test-only helper: two `PairTransport`s wired back-to-back as if they //! were peers on a datagram link. A `send` on one side surfaces as a `Frame` -//! on the other; `connect`/`disconnect` broadcast `Contact`/`Lost`. +//! on the other; `connect`/`disconnect` enqueue `Contact`/`Lost` on the +//! caller's own queue only. //! //! Each side owns its own inbound queue (`inbox`) and holds a shared handle to //! the other side's queue (`peer_inbox`), so outbound frames land in the peer's