diff options
| author | tv <tv@krebsco.de> | 2026-11-30 13:58:03 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-30 13:58:03 +0000 |
| commit | af9de78d7de36848f6ff115c9710fb90d2468af2 (patch) | |
| tree | 57013cd112c7928d72e2a6e2c0c7fb4a55edc92b /src/swarm/peer/inbound.rs | |
| parent | 27b0fb294c47fea75359c3abadab56cd74c93b33 (diff) | |
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.
Diffstat (limited to 'src/swarm/peer/inbound.rs')
| -rw-r--r-- | src/swarm/peer/inbound.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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() ); } |
