Log received and send to

This commit is contained in:
obscuren 2014-07-10 15:03:26 +02:00
parent 67e5689f87
commit 639f1fd339

View File

@ -252,7 +252,7 @@ func (p *Peer) writeMessage(msg *ethwire.Msg) {
}
}
peerlogger.DebugDetailln("<=", msg.Type, msg.Data)
peerlogger.DebugDetailf("(%v) <= %v %v\n", p.conn.RemoteAddr(), msg.Type, msg.Data)
err := ethwire.WriteMessage(p.conn, msg)
if err != nil {
@ -326,7 +326,7 @@ func (p *Peer) HandleInbound() {
peerlogger.Debugln(err)
}
for _, msg := range msgs {
peerlogger.DebugDetailln("=>", msg.Type, msg.Data)
peerlogger.DebugDetailf("(%v) => %v %v\n", p.conn.RemoteAddr(), msg.Type, msg.Data)
switch msg.Type {
case ethwire.MsgHandshakeTy: