aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/store/testfold.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/federation/store/testfold.rs')
-rw-r--r--src/federation/store/testfold.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/federation/store/testfold.rs b/src/federation/store/testfold.rs
index 7e3b703..094c424 100644
--- a/src/federation/store/testfold.rs
+++ b/src/federation/store/testfold.rs
@@ -186,6 +186,11 @@ impl State {
self.cut
}
+ /// The heads the latest cut names, where it is one of the state's events.
+ pub(crate) fn named(&self) -> Option<&[Id]> {
+ self.cuts.get(&self.cut).map(Vec::as_slice)
+ }
+
/// The events here above `heads` (`docs/store.md`, Events): each with them all in its
/// history, and each of its dependencies one of them or above them.
fn above(&self, heads: &BTreeSet<Id>) -> BTreeSet<Id> {