params: avoid importing p2p/discover for bootnodes

params is imported by leaf-ish library packages and should not pull in
the p2p stack.
This commit is contained in:
Felix Lange
2017-01-05 13:56:06 +01:00
parent bbc4ea4ae8
commit b9683d3748
3 changed files with 28 additions and 38 deletions

View File

@ -85,8 +85,8 @@ func NewChainConfig() *ChainConfig {
// by the foundation running the V5 discovery protocol.
func FoundationBootnodes() *Enodes {
nodes := &Enodes{nodes: make([]*discv5.Node, len(params.DiscoveryV5Bootnodes))}
for i, node := range params.DiscoveryV5Bootnodes {
nodes.nodes[i] = node
for i, url := range params.DiscoveryV5Bootnodes {
nodes.nodes[i] = discv5.MustParseNode(url)
}
return nodes
}