blockchain parameter && log tweaks

This commit is contained in:
Jae Kwon
2015-09-11 18:17:19 -07:00
parent 21d45023d3
commit 1c17ea3b14
5 changed files with 9 additions and 7 deletions

View File

@@ -585,7 +585,7 @@ func (ch *Channel) writeMsgPacketTo(w io.Writer) (n int64, err error) {
// Handles incoming msgPackets. Returns a msg bytes if msg is complete.
// Not goroutine-safe
func (ch *Channel) recvMsgPacket(packet msgPacket) ([]byte, error) {
log.Debug("Read Msg Packet", "conn", ch.conn, "packet", packet)
// log.Debug("Read Msg Packet", "conn", ch.conn, "packet", packet)
if wire.MaxBinaryReadSize < len(ch.recving)+len(packet.Bytes) {
return nil, wire.ErrBinaryReadSizeOverflow
}

View File

@@ -119,9 +119,9 @@ func (p *Peer) WriteTo(w io.Writer) (n int64, err error) {
func (p *Peer) String() string {
if p.outbound {
return fmt.Sprintf("Peer{%v out}", p.Key)
return fmt.Sprintf("Peer{%v %v out}", p.mconn, p.Key[:12])
} else {
return fmt.Sprintf("Peer{%v in}", p.Key)
return fmt.Sprintf("Peer{%v %v in}", p.mconn, p.Key[:12])
}
}