Unverified Commit dae3aee5 authored by Felix Lange's avatar Felix Lange Committed by GitHub

les: add bootstrap nodes as initial discoveries (#20688)

parent 05ccbb5e
......@@ -179,6 +179,19 @@ func (pool *serverPool) start(server *p2p.Server, topic discv5.Topic) {
pool.checkDial()
pool.wg.Add(1)
go pool.eventLoop()
// Inject the bootstrap nodes as initial dial candiates.
pool.wg.Add(1)
go func() {
defer pool.wg.Done()
for _, n := range server.BootstrapNodes {
select {
case pool.discNodes <- n:
case <-pool.closeCh:
return
}
}
}()
}
func (pool *serverPool) stop() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment