hash compatibility fix (#717)

This commit is contained in:
Jacek Sieka 2024-08-09 06:23:56 +02:00 committed by GitHub
parent 864d54467e
commit 047de2b788
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ func keccakHash*(a, b: openArray[byte]): KeccakHash =
h.update a
h.update b
func `$`*(v: KeccakHash): string =
func `$`*(v: KeccakHash, dummy = false): string =
var res = newString((len(v.data) shl 1))
discard bytesToHex(v.data, res, {HexFlags.LowerCase})
res
@ -60,7 +60,7 @@ template hash*(x: KeccakHash): Hash =
copyMem(addr h, unsafeAddr x.data[0], static(sizeof(Hash)))
h
func `==`*(a, b: KeccakHash): bool =
func `==`*(a, b: KeccakHash, dummy = false): bool =
when nimvm:
a.data == b.data
else: