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
7ccf51fd
Commit
7ccf51fd
authored
Jan 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated seed peers
parent
3e400739
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
138 additions
and
119 deletions
+138
-119
ethereum.go
ethereum.go
+9
-5
peer.go
peer.go
+129
-114
No files found.
ethereum.go
View file @
7ccf51fd
...
...
@@ -72,10 +72,13 @@ func (s *Ethereum) AddPeer(conn net.Conn) {
peer
:=
NewPeer
(
conn
,
s
,
true
)
if
peer
!=
nil
{
s
.
peers
.
PushBack
(
peer
)
peer
.
Start
()
log
.
Println
(
"Peer connected ::"
,
conn
.
RemoteAddr
())
if
s
.
peers
.
Len
()
>
-
1
{
log
.
Println
(
"SEED"
)
peer
.
Start
(
true
)
}
else
{
s
.
peers
.
PushBack
(
peer
)
peer
.
Start
(
false
)
}
}
}
...
...
@@ -164,8 +167,9 @@ func (s *Ethereum) Start() {
}
else
{
// Starting accepting connections
go
func
()
{
log
.
Println
(
"Ready and accepting connections"
)
for
{
log
.
Println
(
"Ready and accepting connections"
)
conn
,
err
:=
ln
.
Accept
()
if
err
!=
nil
{
log
.
Println
(
err
)
...
...
peer.go
View file @
7ccf51fd
This diff is collapsed.
Click to expand it.
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