fix Eth2Digest compile-time comparison
This commit is contained in:
parent
16abf2989b
commit
44a1263ece
|
@ -100,7 +100,7 @@ template hash*(x: Eth2Digest): Hash =
|
||||||
|
|
||||||
func `==`*(a, b: Eth2Digest): bool =
|
func `==`*(a, b: Eth2Digest): bool =
|
||||||
when nimvm:
|
when nimvm:
|
||||||
a.data[0] == b.data[0]
|
a.data == b.data
|
||||||
else:
|
else:
|
||||||
# nimcrypto uses a constant-time comparison for all MDigest types which for
|
# nimcrypto uses a constant-time comparison for all MDigest types which for
|
||||||
# Eth2Digest is unnecessary - the type should never hold a secret!
|
# Eth2Digest is unnecessary - the type should never hold a secret!
|
||||||
|
|
Loading…
Reference in New Issue