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:
parent
747001250a
commit
428c46c94f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue