Remove unneeded initialization.

This commit is contained in:
cheatfate 2019-03-28 23:18:36 +02:00 committed by zah
parent 6f4c7b775c
commit 3117a4481e
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ func shortLog*(x: Eth2Digest): string =
func eth2hash*(v: openArray[byte]): Eth2Digest =
var ctx: Eth2Hash
ctx.init()
# We can avoid this step for Keccak/SHA3 digests because `ctx` is already
# empty, but if digest will be changed next line must be enabled.
# ctx.init()
ctx.update(v)
result = ctx.finish()