mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 02:15:30 +00:00
Re-add toString function for proper hex logs of content keys (#2508)
This commit is contained in:
parent
6d03acec30
commit
157fb4f1ef
@ -7,9 +7,9 @@
|
||||
|
||||
{.push raises: [].}
|
||||
|
||||
import results, ssz_serialization, eth/rlp, nimcrypto/hash
|
||||
import results, ssz_serialization, stew/byteutils, eth/rlp, nimcrypto/hash
|
||||
|
||||
export hash
|
||||
export hash, ssz_serialization
|
||||
|
||||
type
|
||||
Bytes2* = ByteVector[2]
|
||||
@ -19,6 +19,9 @@ type
|
||||
ContentKeyByteList* = ByteList[2048] # The encoded content key
|
||||
BlockHash* = MDigest[32 * 8] # Bytes32
|
||||
|
||||
func `$`*(x: ByteList[2048]): string =
|
||||
x.asSeq.to0xHex()
|
||||
|
||||
func decodeRlp*(input: openArray[byte], T: type): Result[T, string] =
|
||||
try:
|
||||
ok(rlp.decode(input, T))
|
||||
|
Loading…
x
Reference in New Issue
Block a user