diff options
| author | tv <tv@krebsco.de> | 2026-11-05 00:02:16 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 00:02:16 +0100 |
| commit | ec9131e5b656ff6827cd99c9a939c7d018790bf1 (patch) | |
| tree | 5b4c65d2748f11d876d15e52199d8fb3e7761bf0 /src/document | |
| parent | 069debaf62d9ac5fed2e10aab35c31b2d7beeea6 (diff) | |
delta known to sender
Diffstat (limited to 'src/document')
| -rw-r--r-- | src/document/sync.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/document/sync.rs b/src/document/sync.rs index e921b22..2921bb9 100644 --- a/src/document/sync.rs +++ b/src/document/sync.rs @@ -347,11 +347,13 @@ impl SyncSession { } /// The changes since `before` in `doc` came from the peer (we just applied its - /// message): it has them, so they never go back to it. Automerge goes by what it - /// last heard the peer has, and a message that overtook another makes that older - /// than what the peer sent since: the answer would carry the peer's own changes - /// back. Counted as sent (`sent_hashes`), they don't; Automerge forgets them as sent - /// once the peer's heads cover them. (Changes kept until their predecessors came, + /// message, or a delta it offered): it has them, so they never go back to it. + /// Automerge goes by what it last heard the peer has, and a message that overtook + /// another makes that older than what the peer sent since: the answer would carry + /// the peer's own changes back. A delta comes outside the sync protocol, so + /// Automerge would think the peer lacks all of it, and offer it back as a delta of + /// our own. Counted as sent (`sent_hashes`), they don't; Automerge forgets them as + /// sent once the peer's heads cover them. (Changes kept until their predecessors came, /// from another peer, count too: should this one lack them, it asks, and gets them, /// `resend_if_needed`.) pub(crate) fn came_from_peer( |
