File tree Expand file tree Collapse file tree 4 files changed +22
-22
lines changed Expand file tree Collapse file tree 4 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -488,9 +488,9 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
488
488
// Return pre-configured nodes if none were manually requested
489
489
if ! ctx .GlobalIsSet (BootnodesFlag .Name ) {
490
490
if ctx .GlobalBool (TestNetFlag .Name ) {
491
- return TestnetBootnodes
491
+ return params . TestnetBootnodes
492
492
}
493
- return MainnetBootnodes
493
+ return params . MainnetBootnodes
494
494
}
495
495
// Otherwise parse and use the CLI bootstrap nodes
496
496
bootnodes := []* discover.Node {}
@@ -511,7 +511,7 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
511
511
func MakeBootstrapNodesV5 (ctx * cli.Context ) []* discv5.Node {
512
512
// Return pre-configured nodes if none were manually requested
513
513
if ! ctx .GlobalIsSet (BootnodesFlag .Name ) {
514
- return DiscoveryV5Bootnodes
514
+ return params . DiscoveryV5Bootnodes
515
515
}
516
516
// Otherwise parse and use the CLI bootstrap nodes
517
517
bootnodes := []* discv5.Node {}
Original file line number Diff line number Diff line change @@ -22,20 +22,9 @@ package geth
22
22
import (
23
23
"errors"
24
24
25
- "github.com/ethereum/go-ethereum/cmd/utils"
26
25
"github.com/ethereum/go-ethereum/p2p/discv5"
27
26
)
28
27
29
- // FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
30
- // by the foundation running the V5 discovery protocol.
31
- func FoundationBootnodes () * Enodes {
32
- nodes := & Enodes {nodes : make ([]* discv5.Node , len (utils .DiscoveryV5Bootnodes ))}
33
- for i , node := range utils .DiscoveryV5Bootnodes {
34
- nodes .nodes [i ] = node
35
- }
36
- return nodes
37
- }
38
-
39
28
// Enode represents a host on the network.
40
29
type Enode struct {
41
30
node * discv5.Node
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ package geth
20
20
21
21
import (
22
22
"github.com/ethereum/go-ethereum/core"
23
+ "github.com/ethereum/go-ethereum/p2p/discv5"
23
24
"github.com/ethereum/go-ethereum/params"
24
25
)
25
26
@@ -76,3 +77,13 @@ type ChainConfig struct {
76
77
func NewChainConfig () * ChainConfig {
77
78
return new (ChainConfig )
78
79
}
80
+
81
+ // FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
82
+ // by the foundation running the V5 discovery protocol.
83
+ func FoundationBootnodes () * Enodes {
84
+ nodes := & Enodes {nodes : make ([]* discv5.Node , len (params .DiscoveryV5Bootnodes ))}
85
+ for i , node := range params .DiscoveryV5Bootnodes {
86
+ nodes .nodes [i ] = node
87
+ }
88
+ return nodes
89
+ }
Original file line number Diff line number Diff line change 1
1
// Copyright 2015 The go-ethereum Authors
2
- // This file is part of go-ethereum.
2
+ // This file is part of the go-ethereum library .
3
3
//
4
- // go-ethereum is free software: you can redistribute it and/or modify
5
- // it under the terms of the GNU General Public License as published by
4
+ // The go-ethereum library is free software: you can redistribute it and/or modify
5
+ // it under the terms of the GNU Lesser General Public License as published by
6
6
// the Free Software Foundation, either version 3 of the License, or
7
7
// (at your option) any later version.
8
8
//
9
- // go-ethereum is distributed in the hope that it will be useful,
9
+ // The go-ethereum library is distributed in the hope that it will be useful,
10
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- // GNU General Public License for more details.
12
+ // GNU Lesser General Public License for more details.
13
13
//
14
- // You should have received a copy of the GNU General Public License
15
- // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
14
+ // You should have received a copy of the GNU Lesser General Public License
15
+ // along with the go-ethereum library . If not, see <http://www.gnu.org/licenses/>.
16
16
17
- package utils
17
+ package params
18
18
19
19
import (
20
20
"github.com/ethereum/go-ethereum/p2p/discover"
You can’t perform that action at this time.
0 commit comments