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