mirror of https://github.com/status-im/nim-eth.git
15 lines
345 B
Nim
15 lines
345 B
Nim
import nimcrypto/hash, hashes, stew/byteutils, eth_types, metrics
|
|
|
|
export metrics
|
|
|
|
proc hash*(d: MDigest): Hash {.inline.} = hash(d.data)
|
|
|
|
proc parseAddress*(hexString: string): EthAddress =
|
|
hexToPaddedByteArray[20](hexString)
|
|
|
|
proc `$`*(a: EthAddress): string =
|
|
a.toHex()
|
|
|
|
declarePublicGauge connected_peers, "number of peers in the pool"
|
|
|