From a57716f79c1c7c34916325b494397cc72ae4c7f7 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Nov 2026 20:20:28 +0100 Subject: any message taken as delivered --- src/transport/mod.rs | 5 +++++ src/transport/wire.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/transport') diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 17d6d4c..426ef72 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -666,6 +666,11 @@ pub(crate) struct SyncEnvelope { /// the writer's, on its own push and on every member's after; None otherwise /// (answers, pulls). pub(crate) writer: Option, + /// The sender takes the message as delivered (`SyncSession::assume_delivered`): it + /// had everything the receiver had, so the receiver will hold exactly the sender's + /// heads, and the sender awaits no answer. A receiver it leaves level with the + /// sender answers nothing; one that has changes the sender lacks answers with them. + pub(crate) delivered: bool, } /// What a sync envelope carries. diff --git a/src/transport/wire.rs b/src/transport/wire.rs index 899454c..4199927 100644 --- a/src/transport/wire.rs +++ b/src/transport/wire.rs @@ -14,7 +14,7 @@ use super::{EncodedMessage, MessageKind, ParsedMessage}; /// The wire format's version, the first byte of every payload. Bump it with every change /// to a message type or a codec (`golden_bytes` fails then). -pub(crate) const VERSION: u8 = 24; +pub(crate) const VERSION: u8 = 25; /// What the second byte of a payload says. fn tag(kind: MessageKind) -> u8 { @@ -410,6 +410,7 @@ pub(crate) fn samples() -> Vec { }), ready: true, writer: Some(7), + delivered: true, }), ParsedMessage::Status(status.clone()), ParsedMessage::StatusReply(status), -- cgit v1.3.1