Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
445deb74
Commit
445deb74
authored
Jan 10, 2017
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: fix comma-separated --bootnodes
parent
02b67558
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
flags.go
cmd/utils/flags.go
+4
-4
No files found.
cmd/utils/flags.go
View file @
445deb74
...
...
@@ -337,10 +337,10 @@ var (
Usage
:
"Network listening port"
,
Value
:
30303
,
}
BootnodesFlag
=
cli
.
String
Slice
Flag
{
BootnodesFlag
=
cli
.
StringFlag
{
Name
:
"bootnodes"
,
Usage
:
"Comma separated enode URLs for P2P discovery bootstrap"
,
Value
:
nil
,
Value
:
""
,
}
NodeKeyFileFlag
=
cli
.
StringFlag
{
Name
:
"nodekey"
,
...
...
@@ -487,7 +487,7 @@ func makeNodeUserIdent(ctx *cli.Context) string {
func
MakeBootstrapNodes
(
ctx
*
cli
.
Context
)
[]
*
discover
.
Node
{
urls
:=
params
.
MainnetBootnodes
if
ctx
.
GlobalIsSet
(
BootnodesFlag
.
Name
)
{
urls
=
ctx
.
GlobalStringSlice
(
BootnodesFlag
.
Name
)
urls
=
strings
.
Split
(
ctx
.
GlobalString
(
BootnodesFlag
.
Name
),
","
)
}
else
if
ctx
.
GlobalBool
(
TestNetFlag
.
Name
)
{
urls
=
params
.
TestnetBootnodes
}
...
...
@@ -509,7 +509,7 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
func
MakeBootstrapNodesV5
(
ctx
*
cli
.
Context
)
[]
*
discv5
.
Node
{
urls
:=
params
.
DiscoveryV5Bootnodes
if
ctx
.
GlobalIsSet
(
BootnodesFlag
.
Name
)
{
urls
=
ctx
.
GlobalStringSlice
(
BootnodesFlag
.
Name
)
urls
=
strings
.
Split
(
ctx
.
GlobalString
(
BootnodesFlag
.
Name
),
","
)
}
bootnodes
:=
make
([]
*
discv5
.
Node
,
0
,
len
(
urls
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment