fix Eth2Digest compile-time comparison

This commit is contained in:
Ștefan Talpalaru 2021-02-10 14:22:08 +01:00 committed by zah
parent 16abf2989b
commit 44a1263ece
1 changed files with 1 additions and 1 deletions

View File

@ -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!