summaryrefslogtreecommitdiffstats
path: root/src/state/host.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 20:45:38 +0100
committertv <tv@krebsco.de>2026-10-26 20:45:38 +0100
commit88417aa0660b0766f3c75bf5846361528537e0b9 (patch)
treec2fddb5f536b3dcc1c79fd7369462c240ae9bf48 /src/state/host.rs
parentc598d9c25bc2d1f07044040aae6e1264ef7ada36 (diff)
introduce bounded blob downloads
Diffstat (limited to 'src/state/host.rs')
-rw-r--r--src/state/host.rs8
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
}
}