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.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/federation/store/testfold.rs b/src/federation/store/testfold.rs
index 4b7e1b2..68397e7 100644
--- a/src/federation/store/testfold.rs
+++ b/src/federation/store/testfold.rs
@@ -176,7 +176,12 @@ impl State {
/// Whether `heads` may be a checkpoint's here, and the state is above them.
fn above(&self, heads: &[Id]) -> bool {
- let after = |id: &Id| self.graph.contains_key(id) && !self.before.contains(id);
+ // The heads of the checkpoint the state starts from count as after the checkpoint
+ // current at them, so that a node starting from it judges the cut naming it as
+ // every node does.
+ let after = |id: &Id| {
+ (self.graph.contains_key(id) && !self.before.contains(id)) || self.at.contains(id)
+ };
if heads.is_empty() || !heads.iter().all(after) {
return false;
}