From 93defc68f9b99da921f4746e91e5cee9e6e3f1b9 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 17:39:23 +0000 Subject: swarm: a node says to each peer the kind that peer holds, of those it holds A node holds one kind of document, or, to come, its store in both (Holding::kinds, of_both). The kind a peer's handshakes say is kept with the peer, where the node holds it too, and is what the node says to it in turn; to a peer that said none yet, a node of more than one kind says each in turn, HELLO by HELLO, until one is answered. A node of one kind says and takes that one, as before. --- src/simtest/holding.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/simtest') diff --git a/src/simtest/holding.rs b/src/simtest/holding.rs index ebc7528..0841a75 100644 --- a/src/simtest/holding.rs +++ b/src/simtest/holding.rs @@ -1778,7 +1778,7 @@ async fn a_swarm_of_sets_passes_entries_and_events_on() { let members = &members; sim.wait_ready(members, SOON).await; for node in members.iter() { - assert_eq!(node.kind(), crate::federation::store::set::KIND); + assert_eq!(node.kinds(), [crate::federation::store::set::KIND]); assert!(node.holding.tells_members()); } sim.wait_until("each holds the three entries", SOON, move || async move { @@ -1967,7 +1967,7 @@ async fn a_node_of_a_set_joins_with_nothing_but_the_stores_id() { ); }, ); - assert_eq!(c.kind(), crate::federation::store::set::KIND); + assert_eq!(c.kinds(), [crate::federation::store::set::KIND]); assert!(read(&c, |_| ()).is_none()); sim.wait_ready(&[&c], SOON).await; let (all, ids) = (&[&a, &b, &c], &ids); -- cgit v1.3.1