Skip to content

Commit

Permalink
eth_hash: condition converter deprecation warning on nim version (#756)
Browse files Browse the repository at this point in the history
The warning gives too many false positives - until things work properly,
locally one can just remove it to find instances where it gets used..

nim-lang/Nim#24241
  • Loading branch information
arnetheduck authored Oct 30, 2024
1 parent 5d78c6a commit 719c0df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eth/common/eth_hash.nim
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@ template keccakHash*(v: Address): Hash32 {.deprecated.} =

from nimcrypto/hash import MDigest

converter toMDigest*(v: Hash32): MDigest[256] {.deprecated.} =
# TODO https://github.com/nim-lang/Nim/issues/24241
when (NimMajor, NimMinor) >= (2, 12) or defined(ethDigestConverterWarning):
{.pragma: convdeprecated, deprecated.}
else:
{.pragma: convdeprecated.}

converter toMDigest*(v: Hash32): MDigest[256] {.convdeprecated.} =
MDigest[256](data: v.data)

0 comments on commit 719c0df

Please sign in to comment.