aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-11-14 19:44:35 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-11-15 00:00:14 +0800
commitdfe79cc7845d94d14c2bc091c7eeac082f6b1e90 (patch)
tree18d9c033f86af4eda374261e4c0a165ac2c733c0
parent4a439c2359991bdc49463ae66da11da895cc6eb7 (diff)
downloadgo-tangerine-dfe79cc7845d94d14c2bc091c7eeac082f6b1e90.tar.gz
go-tangerine-dfe79cc7845d94d14c2bc091c7eeac082f6b1e90.tar.zst
go-tangerine-dfe79cc7845d94d14c2bc091c7eeac082f6b1e90.zip
cmd/utils, mobile: place bootnodes in LGPL packages
-rw-r--r--cmd/utils/flags.go6
-rw-r--r--mobile/discover.go11
-rw-r--r--mobile/params.go11
-rw-r--r--params/bootnodes.go (renamed from cmd/utils/bootnodes.go)16
4 files changed, 22 insertions, 22 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 0b18d9f79..1ba905657 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -488,9 +488,9 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
// Return pre-configured nodes if none were manually requested
if !ctx.GlobalIsSet(BootnodesFlag.Name) {
if ctx.GlobalBool(TestNetFlag.Name) {
- return TestnetBootnodes
+ return params.TestnetBootnodes
}
- return MainnetBootnodes
+ return params.MainnetBootnodes
}
// Otherwise parse and use the CLI bootstrap nodes
bootnodes := []*discover.Node{}
@@ -511,7 +511,7 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
func MakeBootstrapNodesV5(ctx *cli.Context) []*discv5.Node {
// Return pre-configured nodes if none were manually requested
if !ctx.GlobalIsSet(BootnodesFlag.Name) {
- return DiscoveryV5Bootnodes
+ return params.DiscoveryV5Bootnodes
}
// Otherwise parse and use the CLI bootstrap nodes
bootnodes := []*discv5.Node{}
diff --git a/mobile/discover.go b/mobile/discover.go
index bb421fc87..9df2d04c3 100644
--- a/mobile/discover.go
+++ b/mobile/discover.go
@@ -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
diff --git a/mobile/params.go b/mobile/params.go
index bf0df7014..48344a538 100644
--- a/mobile/params.go
+++ b/mobile/params.go
@@ -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
+}
diff --git a/cmd/utils/bootnodes.go b/params/bootnodes.go
index 07e64b25f..830b309d6 100644
--- a/cmd/utils/bootnodes.go
+++ b/params/bootnodes.go
@@ -1,20 +1,20 @@
// Copyright 2015 The go-ethereum Authors
-// This file is part of go-ethereum.
+// This file is part of the go-ethereum library.
//
-// go-ethereum is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// The go-ethereum library is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
-// go-ethereum is distributed in the hope that it will be useful,
+// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
+// GNU Lesser General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
+// You should have received a copy of the GNU Lesser General Public License
+// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-package utils
+package params
import (
"github.com/ethereum/go-ethereum/p2p/discover"