Bump nim-eth and adjust code for it (#1293)
This commit is contained in:
parent
01c00c960c
commit
396825344c
|
@ -96,6 +96,5 @@ proc new*(T: type Eth2DiscoveryProtocol,
|
|||
if fileExists(persistentBootstrapFile):
|
||||
loadBootstrapFile(persistentBootstrapFile, bootstrapEnrs, ourPubKey)
|
||||
|
||||
let enrFieldPairs = mapIt(enrFields, toFieldPair(it[0], it[1]))
|
||||
newProtocol(
|
||||
pk, db, ip, tcpPort, udpPort, enrFieldPairs, bootstrapEnrs, rng = rng)
|
||||
pk, db, ip, tcpPort, udpPort, enrFields, bootstrapEnrs, rng = rng)
|
||||
|
|
|
@ -408,14 +408,12 @@ proc bootstrapDiscovery(conf: InspectorConf,
|
|||
let udpPort = Port(conf.discoveryPort)
|
||||
let tcpPort = Port(conf.ethPort)
|
||||
let host = host.toIpAddress()
|
||||
var pairs: seq[FieldPair]
|
||||
if enrFields.isSome():
|
||||
let fields = enrFields.get()
|
||||
pairs = @[toFieldPair("eth2", fields.eth2),
|
||||
toFieldPair("attnets", fields.attnets)]
|
||||
let pairs = {"eth2": fields.eth2, "attnets": fields.attnets}
|
||||
result = newProtocol(pk, db, host, tcpPort, udpPort, pairs, bootnodes)
|
||||
else:
|
||||
pairs = @[]
|
||||
result = newProtocol(pk, db, host, tcpPort, udpPort, pairs, bootnodes)
|
||||
result = newProtocol(pk, db, host, tcpPort, udpPort, [], bootnodes)
|
||||
result.open()
|
||||
result.start()
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 484fbcab1b25072b4c45f496a88d361fc9479be4
|
||||
Subproject commit 8d2614a1ad503952cf8a101ad1a9042107f33d6c
|
Loading…
Reference in New Issue