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
9d887234
Commit
9d887234
authored
Mar 06, 2014
by
Jarrad Hope
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small Optimization on port
parent
e2e33892
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ethereum.go
ethereum.go
+2
-2
No files found.
ethereum.go
View file @
9d887234
...
@@ -270,13 +270,13 @@ func (s *Ethereum) Start() {
...
@@ -270,13 +270,13 @@ func (s *Ethereum) Start() {
// Iterate SRV nodes
// Iterate SRV nodes
for
_
,
n
:=
range
nodes
{
for
_
,
n
:=
range
nodes
{
target
:=
n
.
Target
target
:=
n
.
Target
port
:=
n
.
Port
port
:=
strconv
.
Itoa
(
int
(
n
.
Port
))
// Resolve target to ip (Go returns list, so may resolve to multiple ips?)
// Resolve target to ip (Go returns list, so may resolve to multiple ips?)
addr
,
err
:=
net
.
LookupHost
(
target
)
addr
,
err
:=
net
.
LookupHost
(
target
)
if
(
err
==
nil
)
{
if
(
err
==
nil
)
{
for
_
,
a
:=
range
addr
{
for
_
,
a
:=
range
addr
{
// Build string out of SRV port and Resolved IP
// Build string out of SRV port and Resolved IP
peer
:=
net
.
JoinHostPort
(
a
,
strconv
.
Itoa
(
int
(
port
))
)
peer
:=
net
.
JoinHostPort
(
a
,
port
)
log
.
Println
(
"Found DNS Bootstrap Peer:"
,
peer
)
log
.
Println
(
"Found DNS Bootstrap Peer:"
,
peer
)
peers
=
append
(
peers
,
peer
)
peers
=
append
(
peers
,
peer
)
}
}
...
...
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