aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/handshake.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-30 13:58:03 +0000
committertv <tv@krebsco.de>2026-11-30 13:58:03 +0000
commitaf9de78d7de36848f6ff115c9710fb90d2468af2 (patch)
tree57013cd112c7928d72e2a6e2c0c7fb4a55edc92b /src/swarm/peer/handshake.rs
parent27b0fb294c47fea75359c3abadab56cd74c93b33 (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/handshake.rs')
-rw-r--r--src/swarm/peer/handshake.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/swarm/peer/handshake.rs b/src/swarm/peer/handshake.rs
index 2e5a315..fc1bc86 100644
--- a/src/swarm/peer/handshake.rs
+++ b/src/swarm/peer/handshake.rs
@@ -144,7 +144,7 @@ async fn transmit_hello(state: &AppState, peer: &str) -> Result<()> {
.await
.map(|root| root.0.to_vec()),
party: party(state),
- kind: crate::document::KIND.to_owned(),
+ kind: state.kind().to_owned(),
}),
)
.await;
@@ -255,7 +255,7 @@ pub(super) async fn send_hello_reply(
.await
.map(|root| root.0.to_vec()),
party: party(state),
- kind: crate::document::KIND.to_owned(),
+ kind: state.kind().to_owned(),
};
debug!(to = %peer, ready, "Sending HELLO_REPLY");