diff options
Diffstat (limited to 'src/federation/fold.rs')
| -rw-r--r-- | src/federation/fold.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/federation/fold.rs b/src/federation/fold.rs index b590f07..a527a74 100644 --- a/src/federation/fold.rs +++ b/src/federation/fold.rs @@ -877,6 +877,16 @@ impl Fold for Federation { (heads.iter().copied().collect::<BTreeSet<Id>>() != now.at).then_some(heads) } + /// The events writing the current version: an event without one in its history is + /// written under a version before, by its keys, lists and revision. None where the + /// checkpoint's version is current, which every history holds. + fn judged_by(now: &State) -> Vec<Id> { + now.writing + .get(&now.current().hash) + .map(|events| events.iter().copied().collect()) + .unwrap_or_default() + } + fn members(state: &State) -> Vec<(String, String)> { state.members() } |
