From 44a1263ece1e2030eac71883ddde77ef4f755156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 10 Feb 2021 14:22:08 +0100 Subject: [PATCH] fix Eth2Digest compile-time comparison --- beacon_chain/spec/digest.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/spec/digest.nim b/beacon_chain/spec/digest.nim index 1f29df53e..e888c696d 100644 --- a/beacon_chain/spec/digest.nim +++ b/beacon_chain/spec/digest.nim @@ -100,7 +100,7 @@ template hash*(x: Eth2Digest): Hash = func `==`*(a, b: Eth2Digest): bool = when nimvm: - a.data[0] == b.data[0] + a.data == b.data else: # nimcrypto uses a constant-time comparison for all MDigest types which for # Eth2Digest is unnecessary - the type should never hold a secret!