This commit is contained in:
TIBERGHIEN corentin
2026-01-21 02:45:48 +01:00
parent dacedd1ceb
commit 8b2ab4861b
10 changed files with 351 additions and 460 deletions

View File

@@ -31,7 +31,7 @@ pub fn parse_received_datum(
hash.copy_from_slice(&recevied_datum[offset + 32..offset + 64]);
// envoyer un datum request
dir_entries.push(DirectoryEntry {
filename: name.to_vec(),
filename: name.try_into().expect("incorrect size"),
content_hash: hash,
});
}
@@ -71,10 +71,7 @@ pub fn parse_received_datum(
let mut hash = [0u8; 32];
hash.copy_from_slice(&recevied_datum[offset + 32..offset + 64]);
// envoyer un datum request
dir_entries.push(DirectoryEntry {
filename: name.to_vec(),
content_hash: hash,
});
dir_entries.push(hash);
}
let current = BigDirectoryNode::new(dir_entries);