aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/sync.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 03:40:09 +0100
committertv <tv@krebsco.de>2026-11-05 03:40:09 +0100
commit11d098477cfc76da0bc4385635e4c4b7124a9259 (patch)
tree941640ead4d8e80b291780f708a56f8be53a0fe1 /src/document/sync.rs
parent9f9015a35b591043ebaf6e306f967ffc62cd07f5 (diff)
announce only to those behind
Diffstat (limited to 'src/document/sync.rs')
-rw-r--r--src/document/sync.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/document/sync.rs b/src/document/sync.rs
index 8c04632..e3ff157 100644
--- a/src/document/sync.rs
+++ b/src/document/sync.rs
@@ -28,6 +28,11 @@ impl Received {
!self.0.changes.is_empty()
}
+ /// The sender's heads, as it says.
+ pub(crate) fn heads(&self) -> &[crate::document::ChangeHash] {
+ &self.0.heads
+ }
+
/// The bytes of the changes it carries, and of its bloom filters (`have`).
pub(crate) fn sizes(&self) -> (usize, usize) {
let changes = self.0.changes.iter().map(<[u8]>::len).sum();