aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/store/memory.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 02:45:46 +0100
committertv <tv@krebsco.de>2026-12-01 02:45:46 +0100
commit34bfcb661ed74bf40809576bbb388362cb7ffaa1 (patch)
tree8422db7db396dd4ae83403837cd954a94f882a7a /src/federation/store/memory.rs
parent34434f7fd5a6bab1884a63c96679f48045f4bffd (diff)
parent6a06bc4a955cdf2b5a183c9ff21e25c79a4e5d9f (diff)
Merge remote-tracking branch 'events'HEADmaster
Diffstat (limited to 'src/federation/store/memory.rs')
-rw-r--r--src/federation/store/memory.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/federation/store/memory.rs b/src/federation/store/memory.rs
index 8f099be..6f4ee5d 100644
--- a/src/federation/store/memory.rs
+++ b/src/federation/store/memory.rs
@@ -332,6 +332,14 @@ impl<F: Fold> Store<F> {
.map(|(id, why)| (id, why.as_str(), self.held_back.len()))
}
+ /// The events the store holds back, stopped, in the order offered: the one it stopped
+ /// at, and those offered since. None while it isn't stopped.
+ pub(crate) fn holds_back(&self) -> impl ExactSizeIterator<Item = (Id, &[u8])> {
+ self.held_back
+ .iter()
+ .map(|(id, event)| (*id, event.bytes.as_slice()))
+ }
+
/// What the store holds back, stopped (`Fold::stops`): the events offered since, and
/// those waiting for events it doesn't hold, as it can't tell which will be taken; each
/// after those of its dependencies among them, by ID otherwise. Nothing while it isn't