Fixed cache

This commit is contained in:
Syrus 2020-01-13 15:11:02 +01:00
parent c45819de32
commit fcb158b243

View File

@ -58,7 +58,8 @@ impl WasmHash {
/// is, in fact, a wasm module.
pub fn generate(wasm: &[u8]) -> Self {
let mut first_part = [0u8; 32];
let mut second_part = [0u8; 32];
// We don't use the second part for now, since the blake3 hash is 32 byte array
let second_part = [0u8; 32];
let mut hasher = blake3::Hasher::new();
hasher.update(wasm);
@ -67,7 +68,6 @@ impl WasmHash {
let generic_array = hash.as_bytes();
first_part.copy_from_slice(&generic_array[0..32]);
second_part.copy_from_slice(&generic_array[32..64]);
WasmHash(first_part, second_part)
}