From 371e52cb48bae99232547f6fae6a0487a85c2d04 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 24 Oct 2026 16:18:58 +0200 Subject: add chunked download and use it during rejoin --- src/remake/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/remake/mod.rs') diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 0895931..1c2be36 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -68,6 +68,16 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { /// alive recently enough, read from `doc`. fn electorate(&self, doc: &AutoCommit, now_ms: u64) -> Vec; + /// Downloads a change from peers on the local epoch, in chunks from several at once, + /// checked against its hash. + fn fetch_change( + &self, + hash: automerge::ChangeHash, + ) -> impl Future> + Send; + + /// Starts sync with every peer (e.g. after holding it back). + fn request_sync(&self); + fn is_node_ready(&self) -> impl Future + Send; /// Known (not forgotten) peers. -- cgit v1.3.1