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/state | |
| parent | 2c0799823ad0ec86d12600940ffb06f9d02ed339 (diff) | |
introduce bounded blob downloads
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/host.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/state/host.rs b/src/state/host.rs index 6506274..f6c460d 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -100,11 +100,15 @@ impl Host for AppState { } } - fn fetch_content(&self, hash: [u8; 32]) -> impl Future<Output = Result<Vec<u8>>> + Send { + fn fetch_content( + &self, + hash: [u8; 32], + size: u64, + ) -> impl Future<Output = Result<Vec<u8>>> + Send { let state = self.clone(); async move { let peers = state.active_peers_on_local_epoch().await; - crate::swarm::blob::fetch_content(&state, hash, peers).await + crate::swarm::blob::fetch_content(&state, hash, size, peers).await } } |
