aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-03 02:46:37 +0800
committerobscuren <geffobscura@gmail.com>2014-02-03 02:46:37 +0800
commitf4a96ca588a4c7e1382e9c2265ca306a5b0d0adf (patch)
treebdc84be2083eee99b3f646ffa8bc0c22b39f0127 /peer.go
parent48b41862ef89e3d694b71d452e7f67bfb34ca17f (diff)
downloadgo-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar.gz
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar.bz2
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar.lz
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar.xz
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.tar.zst
go-tangerine-f4a96ca588a4c7e1382e9c2265ca306a5b0d0adf.zip
Removed the seed peer option from start
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/peer.go b/peer.go
index a715e205d..e9a8f6c03 100644
--- a/peer.go
+++ b/peer.go
@@ -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 {