about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/castore/src/proto/grpc_blobservice_wrapper.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
index 33f9a73ea431..9f3f944da26f 100644
--- a/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
+++ b/tvix/castore/src/proto/grpc_blobservice_wrapper.rs
@@ -97,9 +97,12 @@ where
             .try_into()
             .map_err(|_e| Status::invalid_argument("invalid digest length"))?;
 
-        match self.blob_service.has(&req_digest).await {
-            Ok(true) => Ok(Response::new(super::StatBlobResponse::default())),
-            Ok(false) => Err(Status::not_found(format!("blob {} not found", &req_digest))),
+        match self.blob_service.chunks(&req_digest).await {
+            Ok(None) => Err(Status::not_found(format!("blob {} not found", &req_digest))),
+            Ok(Some(chunk_metas)) => Ok(Response::new(super::StatBlobResponse {
+                chunks: chunk_metas,
+                ..Default::default()
+            })),
             Err(e) => Err(e.into()),
         }
     }