swarm: hack to always connect to bootnodes

This commit is contained in:
Anton Evangelatov 2019-01-18 15:34:40 +01:00
parent dcc389a472
commit 3551ef03fe

View file

@ -296,6 +296,15 @@ func bzzd(ctx *cli.Context) error {
stack.Stop() stack.Stop()
}() }()
// add swarm bootnodes, because swarm doesn't use p2p package's discovery discv5
go func() {
s := stack.Server()
for _, n := range cfg.P2P.BootstrapNodes {
s.AddPeer(n)
}
}()
stack.Wait() stack.Wait()
return nil return nil
} }