Fix merkle_proof for eth2_hashing refactor (#593)

This commit is contained in:
Michael Sproul
2019-11-05 18:06:41 +11:00
committed by GitHub
parent c1a2238f1a
commit f5d0ee0ed7

View File

@@ -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(),
));
}
}