Support ENR boot records with the Go daemon

This commit is contained in:
Zahary Karadjov 2020-02-19 10:26:32 +02:00
parent 052a6ac3bc
commit 1b1cd915db
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 6 additions and 0 deletions

View File

@ -207,6 +207,12 @@ when networkBackend in [libp2p, libp2pDaemon]:
bootstrapEnrs: seq[enr.Record]) {.async.} =
when networkBackend == libp2pDaemon:
var connected = false
var bootstrapNodes = bootstrapNodes
for enr in bootstrapEnrs:
let enode = toENode(enr)
if enode.isOk:
bootstrapNodes.add enode.value
for bootstrapNode in bootstrapNodes:
try:
let peerInfo = toPeerInfo(bootstrapNode)