nim-eth/eth/common/utils.nim

15 lines
340 B
Nim
Raw Normal View History

2019-07-10 02:08:35 +02:00
import nimcrypto, hashes, stew/byteutils, eth_types, metrics
export metrics
2019-02-05 12:10:36 +02:00
proc hash*(d: MDigest): Hash {.inline.} = hash(d.data)
proc parseAddress*(hexString: string): EthAddress =
hexToPaddedByteArray[20](hexString)
proc `$`*(a: EthAddress): string =
a.toHex()
2019-07-17 00:21:37 +02:00
declarePublicGauge connected_peers, "number of peers in the pool"
2019-06-26 14:48:04 +02:00