diff options
Diffstat (limited to 'src/federation/store/testfold.rs')
| -rw-r--r-- | src/federation/store/testfold.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/federation/store/testfold.rs b/src/federation/store/testfold.rs index 6dd1460..1b26a4e 100644 --- a/src/federation/store/testfold.rs +++ b/src/federation/store/testfold.rs @@ -452,7 +452,16 @@ impl Fold for TestFold { (heads.iter().copied().collect::<BTreeSet<_>>() != now.at).then(|| heads.clone()) } - fn members(_state: &State) -> Vec<(String, String)> { - Vec::new() + /// The nodes named by what counts at keys `node:<node ID>`, each with what the key + /// holds as its group; none where it holds nothing. + fn members(state: &State) -> Vec<(String, String)> { + state + .counts() + .into_iter() + .filter_map(|(key, group)| { + let node = key.strip_prefix("node:")?; + (!group.is_empty()).then(|| (node.to_owned(), group)) + }) + .collect() } } |
