Skip to content

Commit

Permalink
Fixed cache
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jan 13, 2020
1 parent c45819d commit fcb158b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/runtime-core/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
}

Expand Down

0 comments on commit fcb158b

Please sign in to comment.