aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/held.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-19 01:48:57 +0000
committertv <tv@krebsco.de>2026-11-19 03:18:59 +0100
commit31d41eb1c902c907a5c6e5608510f96c4b1bc864 (patch)
tree5a1a38166c6b22312b4d1eb02adc5dc5f12bce95 /src/federation/held.rs
parent03744437a5ffc36fbb5e973a0ddfd6b91945b212 (diff)
store: a new event builds on as many heads as an event may name
A party's client builds on the heads its node shows (`GET /events`), and a node on its own heads; an event names at most 64 dependencies. With more heads than that, where many write at once and nothing merges, every event built on them was none. `Store::building_on` gives the heads, as many as an event may name (`Fold::DEPENDENCIES`, the federation's 64), the earliest taken first, so that what is written merges what stayed apart the longest; `GET /events` shows those, and a node voting by itself builds on them.
Diffstat (limited to 'src/federation/held.rs')
-rw-r--r--src/federation/held.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/federation/held.rs b/src/federation/held.rs
index 93e2505..8d9d095 100644
--- a/src/federation/held.rs
+++ b/src/federation/held.rs
@@ -728,7 +728,7 @@ impl Holding {
return Ok(Vec::new());
}
let current = store.state().current().clone();
- let heads = store.heads();
+ let heads = store.building_on();
let line = crate::access::sshsig::PublicKey(voter.key.verifying_key().to_bytes()).line();
let mut record = record.clone();
let mut signed = Vec::new();