mirror of https://github.com/status-im/nim-eth.git
IpAddress -> ValidIpAddress
This commit is contained in:
parent
5243c9cf18
commit
4e31a86533
|
@ -2,7 +2,8 @@
|
|||
# https://github.com/ethereum/EIPs/blob/master/EIPS/eip-778.md
|
||||
|
||||
import
|
||||
net, strutils, macros, algorithm, options,
|
||||
strutils, macros, algorithm, options,
|
||||
stew/shims/net,
|
||||
nimcrypto, stew/base64,
|
||||
eth/[rlp, keys]
|
||||
|
||||
|
@ -117,7 +118,7 @@ template toFieldPair*(key: string, value: auto): FieldPair =
|
|||
|
||||
proc init*(T: type Record, seqNum: uint64,
|
||||
pk: PrivateKey,
|
||||
ip: Option[IpAddress],
|
||||
ip: Option[ValidIpAddress],
|
||||
tcpPort, udpPort: Port,
|
||||
extraFields: openarray[FieldPair] = []):
|
||||
EnrResult[T] =
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
import
|
||||
std/[tables, sets, options, math, random],
|
||||
json_serialization/std/net,
|
||||
stew/shims/net as stewNet, json_serialization/std/net,
|
||||
stew/[byteutils, endians2], chronicles, chronos, stint,
|
||||
eth/[rlp, keys], types, encoding, node, routing_table, enr
|
||||
|
||||
|
@ -691,7 +691,7 @@ proc lookupLoop(d: Protocol) {.async, raises: [Exception, Defect].} =
|
|||
trace "lookupLoop canceled"
|
||||
|
||||
proc newProtocol*(privKey: PrivateKey, db: Database,
|
||||
externalIp: Option[IpAddress], tcpPort, udpPort: Port,
|
||||
externalIp: Option[ValidIpAddress], tcpPort, udpPort: Port,
|
||||
localEnrFields: openarray[FieldPair] = [],
|
||||
bootstrapRecords: openarray[Record] = [],
|
||||
bindIp = IPv4_any()):
|
||||
|
|
Loading…
Reference in New Issue