Bump nim-eth and adjust code for it (#1293)

This commit is contained in:
Kim De Mey 2020-07-10 11:17:15 +02:00 committed by GitHub
parent 01c00c960c
commit 396825344c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View File

@ -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)

View File

@ -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()

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit 484fbcab1b25072b4c45f496a88d361fc9479be4
Subproject commit 8d2614a1ad503952cf8a101ad1a9042107f33d6c