display ExecutionAddress as hex string (#5029)

When logging `ExecutionAddress`, serialize it as a hex string instead of
as a byte array.
This commit is contained in:
Etan Kissling 2023-06-04 18:15:14 +02:00 committed by GitHub
parent 12381d5f33
commit 336acbd39b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,6 +382,9 @@ proc readValue*(reader: var JsonReader, value: var ExecutionAddress) {.
raiseUnexpectedValue(reader,
"ExecutionAddress value should be a valid hex string")
func `$`*(v: ExecutionAddress): string =
v.data.toHex()
func shortLog*(v: SomeBeaconBlock): auto =
(
slot: shortLog(v.slot),