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
5a83114e
Commit
5a83114e
authored
Feb 10, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Seed bootstrapping added
parent
42123b43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
ethereum.go
ethereum.go
+16
-0
No files found.
ethereum.go
View file @
5a83114e
...
@@ -6,8 +6,10 @@ import (
...
@@ -6,8 +6,10 @@ import (
"github.com/ethereum/ethdb-go"
"github.com/ethereum/ethdb-go"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethwire-go"
"github.com/ethereum/ethwire-go"
"io/ioutil"
"log"
"log"
"net"
"net"
"net/http"
"strconv"
"strconv"
"sync"
"sync"
"sync/atomic"
"sync/atomic"
...
@@ -243,6 +245,20 @@ func (s *Ethereum) Start() {
...
@@ -243,6 +245,20 @@ func (s *Ethereum) Start() {
// Start the tx pool
// Start the tx pool
s
.
TxPool
.
Start
()
s
.
TxPool
.
Start
()
resp
,
err
:=
http
.
Get
(
"http://www.ethereum.org/servers.poc2.txt"
)
if
err
!=
nil
{
log
.
Println
(
"Fetching seed failed:"
,
err
)
return
}
defer
resp
.
Body
.
Close
()
body
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
log
.
Println
(
"Reading seed failed:"
,
err
)
return
}
s
.
ConnectToPeer
(
string
(
body
))
}
}
func
(
s
*
Ethereum
)
peerHandler
(
listener
net
.
Listener
)
{
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