aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport
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/transport
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/transport')
-rw-r--r--src/transport/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index 6fe17eb..4fa3ec3 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -861,6 +861,12 @@ pub(crate) struct DeltaSignatures {
}
impl DeltaSpec {
+ /// Where whoever offers it stands, as a keepalive would say it: what it offers is
+ /// what it has.
+ pub(crate) fn stands(&self) -> HeadsSummary {
+ HeadsSummary::of(self.to.clone())
+ }
+
pub(crate) fn new(mut from: Vec<ChangeHash>, mut to: Vec<ChangeHash>) -> Self {
from.sort_unstable();
from.dedup();