From 1b1cd915dbb1c1afeebc4f1fd9b0532bfbec4c52 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Wed, 19 Feb 2020 10:26:32 +0200 Subject: [PATCH] Support ENR boot records with the Go daemon --- beacon_chain/eth2_network.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index b984596f5..6346524a4 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -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)