cmd/utils, mobile: place bootnodes in LGPL packages

This commit is contained in:
Péter Szilágyi
2016-11-14 13:44:35 +02:00
parent 4a439c2359
commit dfe79cc784
4 changed files with 22 additions and 22 deletions

View File

@ -22,20 +22,9 @@ package geth
import (
"errors"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/p2p/discv5"
)
// FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
// by the foundation running the V5 discovery protocol.
func FoundationBootnodes() *Enodes {
nodes := &Enodes{nodes: make([]*discv5.Node, len(utils.DiscoveryV5Bootnodes))}
for i, node := range utils.DiscoveryV5Bootnodes {
nodes.nodes[i] = node
}
return nodes
}
// Enode represents a host on the network.
type Enode struct {
node *discv5.Node

View File

@ -20,6 +20,7 @@ package geth
import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/params"
)
@ -76,3 +77,13 @@ type ChainConfig struct {
func NewChainConfig() *ChainConfig {
return new(ChainConfig)
}
// FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
// 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
}
return nodes
}