nim-eth/eth/common/utils.nim

15 lines
345 B
Nim
Raw Normal View History

2019-12-09 12:08:42 +01:00
import nimcrypto/hash, hashes, stew/byteutils, eth_types, metrics
2019-07-10 02:08:35 +02:00
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