From 88417aa0660b0766f3c75bf5846361528537e0b9 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 26 Oct 2026 20:45:38 +0100 Subject: introduce bounded blob downloads --- src/remake/mod.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/remake/mod.rs') diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 38c2b9c..ad027a7 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -87,10 +87,13 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { hash: automerge::ChangeHash, ) -> impl Future> + Send; - /// Downloads content by its BLAKE3 hash from peers on the local epoch, checked - /// against it. - fn fetch_content(&self, hash: [u8; 32]) - -> impl Future>> + Send; + /// Downloads content of `size` bytes by its BLAKE3 hash from peers on the local + /// epoch, checked against it. + fn fetch_content( + &self, + hash: [u8; 32], + size: u64, + ) -> impl Future>> + Send; /// Starts sync with every peer (e.g. after holding it back). fn request_sync(&self); -- cgit v1.3.1