From 41c4e9718235d658badfe9f4411a9d6186023ccf Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Fri, 13 Feb 2015 11:59:31 +0100 Subject: [PATCH] Show only the first 128 bytes of chunks --- p2p/peer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/p2p/peer.go b/p2p/peer.go index 8987f48f41..9f7dfb9869 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -300,7 +300,11 @@ func (p *Peer) dispatch(msg Msg, protoDone chan struct{}) (wait bool, err error) // of it and move on to the next message buf, err := ioutil.ReadAll(msg.Payload) if len(buf) > 0 { - p.Debugf("Received message %x", buf) + if len(buf) < 128 { + p.Debugf("Received message %x", buf) + } else { + p.Debugf("Received message %x", buf[:128]) + } } if err != nil { return false, err