diff options
| author | tv <tv@krebsco.de> | 2026-10-26 20:45:38 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-26 20:45:38 +0100 |
| commit | 0cdf32d29212a705f6099880291ae6c611c56883 (patch) | |
| tree | 9f714237ecbbca041c88dcf1d6b2ac91cdee0971 /src/remake/mod.rs | |
| parent | 2c0799823ad0ec86d12600940ffb06f9d02ed339 (diff) | |
introduce bounded blob downloads
Diffstat (limited to 'src/remake/mod.rs')
| -rw-r--r-- | src/remake/mod.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 1906223..e6222a3 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<Output = anyhow::Result<automerge::Change>> + 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<Output = anyhow::Result<Vec<u8>>> + 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<Output = anyhow::Result<Vec<u8>>> + Send; /// Starts sync with every peer (e.g. after holding it back). fn request_sync(&self); |
