From 3a195b91002ac13c449d0968198ac36b7c78b915 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 14 Feb 2014 12:44:53 -0600 Subject: [PATCH] Remove duplicate PEER prefix from peer logging. These were left over from the switch to the logging subsystems which include the prefix as a part of the subsystem. --- peer.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/peer.go b/peer.go index be39b2fe..8f7ef539 100644 --- a/peer.go +++ b/peer.go @@ -267,7 +267,7 @@ func (p *peer) handleVersionMsg(msg *btcwire.MsgVersion) { // Limit to one version message per peer. if p.versionKnown { - p.logError("PEER: Only one version message per peer is allowed %s.", + p.logError("Only one version message per peer is allowed %s.", p.addr) p.Disconnect() return @@ -475,8 +475,8 @@ func (p *peer) PushGetHeadersMsg(locator btcchain.BlockLocator, stopHash *btcwir beginHash != nil && stopHash.IsEqual(p.prevGetHdrsStop) && beginHash.IsEqual(p.prevGetHdrsBegin) { - peerLog.Tracef("PEER: Filtering duplicate [getheaders] with "+ - "begin hash %v", beginHash) + peerLog.Tracef("Filtering duplicate [getheaders] with begin "+ + "hash %v", beginHash) return nil } @@ -1093,7 +1093,7 @@ out: // Only log the error if we're not forcibly disconnecting. if atomic.LoadInt32(&p.disconnect) == 0 { - p.logError("PEER: Can't read message: %v", err) + p.logError("Can't read message: %v", err) } break out } @@ -1101,7 +1101,7 @@ out: // Ensure version message comes first. if _, ok := rmsg.(*btcwire.MsgVersion); !ok && !p.versionKnown { - p.logError("PEER: A version message must precede all others") + p.logError("A version message must precede all others") break out } @@ -1499,8 +1499,7 @@ func (p *peer) Start() error { if !p.inbound { err := p.pushVersionMsg() if err != nil { - p.logError("PEER: Can't send outbound version "+ - "message %v", err) + p.logError("Can't send outbound version message %v", err) p.Disconnect() return err }