From af9de78d7de36848f6ff115c9710fb90d2468af2 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 13:58:03 +0000 Subject: swarm: a node says the kind of the document it holds In its handshakes, and checks a peer's against it (AppState::kind): a set of events where one carries its store (Holding::of_a_set), else Automerge's, as it was for every node. --- src/swarm/peer/inbound.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/swarm/peer/inbound.rs') diff --git a/src/swarm/peer/inbound.rs b/src/swarm/peer/inbound.rs index a558ded..dbf1a2e 100644 --- a/src/swarm/peer/inbound.rs +++ b/src/swarm/peer/inbound.rs @@ -114,11 +114,11 @@ pub(crate) async fn handle_message( ParsedMessage::HelloReply(reply) => Some(&reply.kind), _ => None, }; - if let Some(theirs) = kind.filter(|kind| *kind != crate::document::KIND) { + if let Some(theirs) = kind.filter(|kind| *kind != state.kind()) { anyhow::bail!( "{peer} holds a document of another kind ({theirs}; this node's is {}): they sync \ nothing; a release that knows the kind does", - crate::document::KIND + state.kind() ); } -- cgit v1.3.1