From f5d0ee0ed7a481d918a6c5bb491ce1fafcb26d5a Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 5 Nov 2019 18:06:41 +1100 Subject: [PATCH] Fix merkle_proof for eth2_hashing refactor (#593) --- eth2/utils/merkle_proof/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth2/utils/merkle_proof/src/lib.rs b/eth2/utils/merkle_proof/src/lib.rs index 356c668352..bfc9cc26ec 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(), + )); } }