good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
maticnetwork
bor
Commits
dfe79cc7
Unverified
Commit
dfe79cc7
authored
8 years ago
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
cmd/utils, mobile: place bootnodes in LGPL packages
parent
4a439c23
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmd/utils/flags.go
+3
-3
3 additions, 3 deletions
cmd/utils/flags.go
mobile/discover.go
+0
-11
0 additions, 11 deletions
mobile/discover.go
mobile/params.go
+11
-0
11 additions, 0 deletions
mobile/params.go
params/bootnodes.go
+8
-8
8 additions, 8 deletions
params/bootnodes.go
with
22 additions
and
22 deletions
cmd/utils/flags.go
+
3
−
3
View file @
dfe79cc7
...
...
@@ -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
{}
...
...
This diff is collapsed.
Click to expand it.
mobile/discover.go
+
0
−
11
View file @
dfe79cc7
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
mobile/params.go
+
11
−
0
View file @
dfe79cc7
...
...
@@ -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
}
This diff is collapsed.
Click to expand it.
cmd/util
s/bootnodes.go
→
param
s/bootnodes.go
+
8
−
8
View file @
dfe79cc7
// 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
util
s
package
param
s
import
(
"github.com/ethereum/go-ethereum/p2p/discover"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment