mirror of https://github.com/status-im/nim-eth.git
compat with latest chronos
This commit is contained in:
parent
44adb2a70a
commit
0f020d5df8
|
@ -1,5 +1,5 @@
|
||||||
import
|
import
|
||||||
chronos/[asyncfutures2, asyncloop], chronicles
|
chronos, chronicles
|
||||||
|
|
||||||
proc catchOrQuit(error: Exception) =
|
proc catchOrQuit(error: Exception) =
|
||||||
if error of CatchableError:
|
if error of CatchableError:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import
|
import
|
||||||
times, net,
|
times, net,
|
||||||
json_serialization, nimcrypto/hash, eth_types
|
json_serialization, nimcrypto/[hash, utils], eth_types
|
||||||
|
|
||||||
proc writeValue*(w: var JsonWriter, a: MDigest) {.inline.} =
|
proc writeValue*(w: var JsonWriter, a: MDigest) {.inline.} =
|
||||||
w.writeValue $a
|
w.writeValue a.data.toHex(true)
|
||||||
|
|
||||||
proc readValue*(r: var JsonReader, a: var MDigest) {.inline.} =
|
proc readValue*(r: var JsonReader, a: var MDigest) {.inline.} =
|
||||||
a = fromHex(type(a), r.readValue(string))
|
a = fromHex(type(a), r.readValue(string))
|
||||||
|
|
Loading…
Reference in New Issue