nim-eth/eth/common/utils.nim

15 lines
345 B
Nim
Raw Normal View History

2019-12-09 11:08:42 +00:00
import nimcrypto/hash, hashes, stew/byteutils, eth_types, metrics
2019-07-10 00:08:35 +00:00
export metrics
2019-02-05 10:10:36 +00: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-16 22:21:37 +00:00
declarePublicGauge connected_peers, "number of peers in the pool"
2019-06-26 12:48:04 +00:00