eth_hash: condition converter deprecation warning on nim version (#756)

The warning gives too many false positives - until things work properly,
locally one can just remove it to find instances where it gets used..

https://github.com/nim-lang/Nim/issues/24241
This commit is contained in:
Jacek Sieka 2024-10-30 09:10:10 +01:00 committed by GitHub
parent 5d78c6a879
commit 719c0dfd56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

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