compat with latest chronos

This commit is contained in:
Jacek Sieka 2019-09-10 17:28:38 -04:00
parent 44adb2a70a
commit 0f020d5df8
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
2 changed files with 3 additions and 3 deletions

View File

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

View File

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