diff --git a/eth2/utils/merkle_proof/src/lib.rs b/eth2/utils/merkle_proof/src/lib.rs index 356c66835..bfc9cc26e 100644 --- a/eth2/utils/merkle_proof/src/lib.rs +++ b/eth2/utils/merkle_proof/src/lib.rs @@ -124,7 +124,10 @@ impl MerkleTree { // All other possibilities are invalid MerkleTrees (_, _) => return Err(MerkleTreeError::Invalid), }; - *hash = hash_concat(left.hash(), right.hash()); + hash.assign_from_slice(&hash_concat( + left.hash().as_bytes(), + right.hash().as_bytes(), + )); } }