aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/sync.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 04:05:41 +0000
committertv <tv@krebsco.de>2026-11-29 04:08:47 +0000
commit2a475153b715c954935ae46d3773ffbf3d007f03 (patch)
tree8ebe8a5d6cdaf9869822f95fe2ac7eca0c10cf7f /src/document/sync.rs
parent2ae7562083f5f96490f90e9398762cf6a024d51e (diff)
document: where a document stands, and a peer, is the document's to compare
document::passing: a Mark, where a document stood, by which what changed since and the node's own units since are told (changed_since, own_since: the change publisher, the sync worker); and of where a peer says it stands, what the document lacks, whether the peer holds what the document held, a pull of what is lacking, and what it has counting as sent no more (lacking, peer_holds, pull, heard: the relay, keepalives). The published stamp gives its summary and its mark.
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 e1caaef..805d1f9 100644
--- a/src/document/sync.rs
+++ b/src/document/sync.rs
@@ -101,6 +101,11 @@ impl Received {
}))
}
+ /// Where the sender says it stands, as a keepalive would say it.
+ pub(crate) fn stands(&self) -> crate::transport::HeadsSummary {
+ crate::transport::HeadsSummary::of(self.heads().to_vec())
+ }
+
/// The sender's heads, as it says.
pub(crate) fn heads(&self) -> &[crate::document::ChangeHash] {
&self.0.heads