From b3e46900d95432ba0bfb7f20c08a94e2f498a8dc Mon Sep 17 00:00:00 2001 From: dospore Date: Mon, 26 Feb 2024 13:19:45 +1000 Subject: [PATCH] Simplify keccak call --- beacon_node/execution_layer/src/keccak.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon_node/execution_layer/src/keccak.rs b/beacon_node/execution_layer/src/keccak.rs index c78f1fcd37..62e354d503 100644 --- a/beacon_node/execution_layer/src/keccak.rs +++ b/beacon_node/execution_layer/src/keccak.rs @@ -16,8 +16,7 @@ use hash_db::Hasher; use types::Hash256; pub fn keccak256(bytes: &[u8]) -> Hash256 { - let hash: [u8; 32] = alloy_primitives::utils::keccak256(bytes).into(); - Hash256::from(hash) + Hash256::from(alloy_primitives::utils::keccak256(bytes).as_ref()) } /// Keccak hasher.