aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-01-13 00:19:14 +0800
committerobscuren <geffobscura@gmail.com>2014-01-13 00:19:14 +0800
commitf78bd4d5d0a6198c2c0e709440d9aa370e840617 (patch)
treecf12715f3ee3017810c2ec17fd035ce9f47097ab /peer.go
parente280a2a7e3d51f0fb3b35e580332d9b51a7e50c1 (diff)
downloaddexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.gz
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.bz2
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.lz
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.xz
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.tar.zst
dexon-f78bd4d5d0a6198c2c0e709440d9aa370e840617.zip
Format
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/peer.go b/peer.go
index 2dda1f94f..0875c6e45 100644
--- a/peer.go
+++ b/peer.go
@@ -1,8 +1,8 @@
package main
import (
- "github.com/ethereum/ethwire-go"
"github.com/ethereum/ethutil-go"
+ "github.com/ethereum/ethwire-go"
"log"
"net"
)
@@ -24,15 +24,15 @@ func NewPeer(conn net.Conn, server *Server, inbound bool) *Peer {
return &Peer{
outputQueue: make(chan *ethwire.InOutMsg, 1), // Buffered chan of 1 is enough
quit: make(chan bool),
- server: server,
- conn: conn,
- inbound: inbound,
+ server: server,
+ conn: conn,
+ inbound: inbound,
}
}
// Outputs any RLP encoded data to the peer
func (p *Peer) QueueMessage(msg *ethwire.InOutMsg) {
- p.outputQueue <- msg//ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data}
+ p.outputQueue <- msg //ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data}
}
// Outbound message handler. Outbound messages are handled here
@@ -145,4 +145,3 @@ func (p *Peer) handleVersionAck(msg *ethwire.InOutMsg) {
}
}
}
-