Support ENR boot records with the Go daemon
This commit is contained in:
parent
052a6ac3bc
commit
1b1cd915db
|
@ -207,6 +207,12 @@ when networkBackend in [libp2p, libp2pDaemon]:
|
||||||
bootstrapEnrs: seq[enr.Record]) {.async.} =
|
bootstrapEnrs: seq[enr.Record]) {.async.} =
|
||||||
when networkBackend == libp2pDaemon:
|
when networkBackend == libp2pDaemon:
|
||||||
var connected = false
|
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:
|
for bootstrapNode in bootstrapNodes:
|
||||||
try:
|
try:
|
||||||
let peerInfo = toPeerInfo(bootstrapNode)
|
let peerInfo = toPeerInfo(bootstrapNode)
|
||||||
|
|
Loading…
Reference in New Issue