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
74d70120
Commit
74d70120
authored
Jul 29, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added temp seed
parent
5ca29381
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
ethereum.go
ethereum.go
+7
-18
No files found.
ethereum.go
View file @
74d70120
...
...
@@ -3,10 +3,8 @@ package eth
import
(
"container/list"
"fmt"
"io/ioutil"
"math/rand"
"net"
"net/http"
"strconv"
"strings"
"sync"
...
...
@@ -21,7 +19,10 @@ import (
"github.com/ethereum/eth-go/ethwire"
)
const
seedTextFileUri
string
=
"http://www.ethereum.org/servers.poc3.txt"
const
(
seedTextFileUri
string
=
"http://www.ethereum.org/servers.poc3.txt"
seedNodeAddress
=
"54.76.56.74:30303"
)
var
ethlogger
=
ethlog
.
NewLogger
(
"SERV"
)
...
...
@@ -421,22 +422,10 @@ func (s *Ethereum) Seed() {
}
// Connect to Peer list
s
.
ProcessPeerList
(
peers
)
}
else
{
// Fallback to servers.poc3.txt
resp
,
err
:=
http
.
Get
(
seedTextFileUri
)
if
err
!=
nil
{
ethlogger
.
Warnln
(
"Fetching seed failed:"
,
err
)
return
}
defer
resp
.
Body
.
Close
()
body
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
ethlogger
.
Warnln
(
"Reading seed failed:"
,
err
)
return
}
s
.
ConnectToPeer
(
string
(
body
))
}
// XXX tmp
s
.
ConnectToPeer
(
seedNodeAddress
)
}
func
(
s
*
Ethereum
)
peerHandler
(
listener
net
.
Listener
)
{
...
...
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