fix for the BN/VC communication since the #1371 PR (#1416)

This commit is contained in:
Viktor Kirilov 2020-08-04 11:15:26 +03:00 committed by GitHub
parent 9522c611bc
commit d7d1e072ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ proc fromJson*(n: JsonNode, argName: string, result: var ValidatorPubKey) =
result = ValidatorPubKey.fromHex(n.getStr()).tryGet()
proc `%`*(pubkey: ValidatorPubKey): JsonNode =
unsafePromote(pubkey.unsafeAddr)
result = newJString($pubkey)
proc fromJson*(n: JsonNode, argName: string, result: var List) =
@ -31,6 +32,7 @@ proc fromJson*(n: JsonNode, argName: string, result: var ValidatorSig) =
result = ValidatorSig.fromHex(n.getStr()).tryGet()
proc `%`*(value: ValidatorSig): JsonNode =
unsafePromote(value.unsafeAddr)
result = newJString($value)
proc fromJson*(n: JsonNode, argName: string, result: var Version) =