Add writeValue for BlockNumber (#136)

As it is also possible to use directly BlockNumber instead of the
RtBlockIdentifier in the eth_api.
This commit is contained in:
Kim De Mey 2024-03-15 09:05:24 +01:00 committed by GitHub
parent 747001250a
commit 428c46c94f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ proc writeValue*[F: CommonJsonFlavors](w: var JsonWriter[F], v: RlpEncodedBytes)
{.gcsafe, raises: [IOError].} =
writeHexValue w, distinctBase(v)
proc writeValue*[F: CommonJsonFlavors](w: var JsonWriter[F], v: Quantity)
proc writeValue*[F: CommonJsonFlavors](w: var JsonWriter[F], v: Quantity | BlockNumber)
{.gcsafe, raises: [IOError].} =
w.stream.write "\"0x"
w.stream.toHex(distinctBase v)