From b4aa915fcd1d6f49c4b00d207881b269442644fb Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 17:18:47 +0000 Subject: store: the fold says how large an event may be, and the document judges by it The document took any bytes that hash to their key, while the fold bounds events (the federation: 256 KiB): one change of any size filled every node until the next remake. How large an event may be is a question of the change alone, so the fold says it (`Fold::LARGEST`), the document refuses a change putting a larger one, and the store takes such bytes as none. --- src/federation/store/testfold.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/federation/store/testfold.rs') diff --git a/src/federation/store/testfold.rs b/src/federation/store/testfold.rs index bbe0307..baaba55 100644 --- a/src/federation/store/testfold.rs +++ b/src/federation/store/testfold.rs @@ -289,6 +289,8 @@ pub(crate) struct TestFold; impl Fold for TestFold { type State = State; + const LARGEST: usize = 64 * 1024; + fn dependencies(event: &[u8]) -> Option> { decode(event).map(|(deps, _)| deps) } -- cgit v1.3.1