From 957645d75221faca617f4f644b8a665352203399 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Thu, 14 Nov 2019 14:37:34 +0000 Subject: [PATCH] Fix the bulds with json logging enabled --- beacon_chain/spec/datatypes.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beacon_chain/spec/datatypes.nim b/beacon_chain/spec/datatypes.nim index 2e5624f39..e5a316bfc 100644 --- a/beacon_chain/spec/datatypes.nim +++ b/beacon_chain/spec/datatypes.nim @@ -452,6 +452,12 @@ template ethTimeUnit(typ: type) {.dirty.} = proc readValue*(reader: var JsonReader, value: var typ) = value = typ reader.readValue(uint64) +proc writeValue*(writer: var JsonWriter, value: ValidatorIndex) = + writeValue(writer, uint32 value) + +proc readValue*(reader: var JsonReader, value: var ValidatorIndex) = + value = ValidatorIndex reader.readValue(uint32) + proc `%`*(i: uint64): JsonNode = % int(i)