From 2ae7562083f5f96490f90e9398762cf6a024d51e Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 04:00:43 +0000 Subject: document: a unit's name, which the swarm passes on by document::UnitId: the name of a unit of a document as its kind has it, an Automerge change's hash. What the swarm announces, forwards along trees, tells a peer it refused and drops is named so (the dissemination, relay, refusals, AppState::drop_taken), and the session is told so what a peer gets from another; a change's hash it is where the document is asked, and on the wire. --- src/swarm/tree.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/swarm/tree.rs') diff --git a/src/swarm/tree.rs b/src/swarm/tree.rs index 4d5afd8..0dd4e31 100644 --- a/src/swarm/tree.rs +++ b/src/swarm/tree.rs @@ -388,7 +388,7 @@ pub(crate) async fn note_arrival( peer: &str, writer: Option, carried: bool, - authors: &[(String, Vec)], + authors: &[(String, Vec)], ) { match writer { Some(writer) if carried => { @@ -663,7 +663,7 @@ pub(crate) async fn forward( state: &AppState, writer: u64, from: &str, - changes: &[crate::document::ChangeHash], + changes: &[crate::document::UnitId], ) -> Option { let plan = plan(state, writer).await?; Some(crate::swarm::dissemination::pass_on(state, writer, from, changes, plan).await) @@ -688,7 +688,7 @@ impl crate::swarm::dissemination::Dissemination for WritersTrees { state: &AppState, writer: u64, from: &str, - changes: &[crate::document::ChangeHash], + changes: &[crate::document::UnitId], ) -> Option { forward(state, writer, from, changes).await } @@ -699,7 +699,7 @@ impl crate::swarm::dissemination::Dissemination for WritersTrees { peer: &str, writer: Option, carried: bool, - authors: &[(String, Vec)], + authors: &[(String, Vec)], ) { note_arrival(state, peer, writer, carried, authors).await; } -- cgit v1.3.1