about summary refs log tree commit diff
path: root/tvix/store/src/nar/renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/nar/renderer.rs')
-rw-r--r--tvix/store/src/nar/renderer.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/tvix/store/src/nar/renderer.rs b/tvix/store/src/nar/renderer.rs
index 94a392d36171..f0708ab739a5 100644
--- a/tvix/store/src/nar/renderer.rs
+++ b/tvix/store/src/nar/renderer.rs
@@ -103,20 +103,23 @@ impl<BS: BlobService, CS: ChunkService + Clone, DS: DirectoryService> NARRendere
             }
             proto::node::Node::Directory(proto_directory_node) => {
                 // get the digest we're referring to
-                let digest = proto_directory_node.digest;
+                let digest: [u8; 32] = proto_directory_node.digest.try_into().map_err(|_e| {
+                    RenderError::StoreError(crate::Error::StorageError(
+                        "invalid digest len in directory node".to_string(),
+                    ))
+                })?;
+
                 // look it up with the directory service
                 let resp = self
                     .directory_service
-                    .get(&proto::get_directory_request::ByWhat::Digest(
-                        digest.to_vec(),
-                    ))
+                    .get(&digest)
                     .map_err(RenderError::StoreError)?;
 
                 match resp {
                     // if it's None, that's an error!
                     None => {
                         return Err(RenderError::DirectoryNotFound(
-                            digest,
+                            digest.to_vec(),
                             proto_directory_node.name,
                         ))
                     }