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
f4a96ca5
Commit
f4a96ca5
authored
Feb 02, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the seed peer option from start
parent
48b41862
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
ethereum.go
ethereum.go
+1
-1
peer.go
peer.go
+2
-15
No files found.
ethereum.go
View file @
f4a96ca5
...
...
@@ -96,7 +96,7 @@ func (s *Ethereum) AddPeer(conn net.Conn) {
if
peer
!=
nil
{
s
.
peers
.
PushBack
(
peer
)
peer
.
Start
(
false
)
peer
.
Start
()
}
}
...
...
peer.go
View file @
f4a96ca5
...
...
@@ -76,9 +76,6 @@ type Peer struct {
// this to prevent receiving false peers.
requestedPeerList
bool
// Determines whether this is a seed peer
seed
bool
host
[]
byte
port
uint16
caps
Caps
...
...
@@ -123,7 +120,7 @@ func NewOutboundPeer(addr string, ethereum *Ethereum, caps Caps) *Peer {
atomic
.
StoreInt32
(
&
p
.
connected
,
1
)
atomic
.
StoreInt32
(
&
p
.
disconnect
,
0
)
p
.
Start
(
false
)
p
.
Start
()
}()
return
p
...
...
@@ -155,14 +152,6 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) {
p
.
Stop
()
return
}
// XXX TMP CODE FOR TESTNET
switch
msg
.
Type
{
case
ethwire
.
MsgPeersTy
:
if
p
.
seed
{
p
.
Stop
()
}
}
}
// Outbound message handler. Outbound messages are handled here
...
...
@@ -349,9 +338,7 @@ func unpackAddr(value *ethutil.RlpValue, p uint64) string {
return
net
.
JoinHostPort
(
host
,
port
)
}
func
(
p
*
Peer
)
Start
(
seed
bool
)
{
p
.
seed
=
seed
func
(
p
*
Peer
)
Start
()
{
peerHost
,
peerPort
,
_
:=
net
.
SplitHostPort
(
p
.
conn
.
LocalAddr
()
.
String
())
servHost
,
servPort
,
_
:=
net
.
SplitHostPort
(
p
.
conn
.
RemoteAddr
()
.
String
())
if
peerHost
==
servHost
{
...
...
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