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.
This commit is contained in:
parent
9306270a84
commit
3a195b9100
1 changed files with 6 additions and 7 deletions
13
peer.go
13
peer.go
|
@ -267,7 +267,7 @@ func (p *peer) handleVersionMsg(msg *btcwire.MsgVersion) {
|
||||||
|
|
||||||
// Limit to one version message per peer.
|
// Limit to one version message per peer.
|
||||||
if p.versionKnown {
|
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.addr)
|
||||||
p.Disconnect()
|
p.Disconnect()
|
||||||
return
|
return
|
||||||
|
@ -475,8 +475,8 @@ func (p *peer) PushGetHeadersMsg(locator btcchain.BlockLocator, stopHash *btcwir
|
||||||
beginHash != nil && stopHash.IsEqual(p.prevGetHdrsStop) &&
|
beginHash != nil && stopHash.IsEqual(p.prevGetHdrsStop) &&
|
||||||
beginHash.IsEqual(p.prevGetHdrsBegin) {
|
beginHash.IsEqual(p.prevGetHdrsBegin) {
|
||||||
|
|
||||||
peerLog.Tracef("PEER: Filtering duplicate [getheaders] with "+
|
peerLog.Tracef("Filtering duplicate [getheaders] with begin "+
|
||||||
"begin hash %v", beginHash)
|
"hash %v", beginHash)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,7 +1093,7 @@ out:
|
||||||
|
|
||||||
// Only log the error if we're not forcibly disconnecting.
|
// Only log the error if we're not forcibly disconnecting.
|
||||||
if atomic.LoadInt32(&p.disconnect) == 0 {
|
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
|
break out
|
||||||
}
|
}
|
||||||
|
@ -1101,7 +1101,7 @@ out:
|
||||||
|
|
||||||
// Ensure version message comes first.
|
// Ensure version message comes first.
|
||||||
if _, ok := rmsg.(*btcwire.MsgVersion); !ok && !p.versionKnown {
|
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
|
break out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1499,8 +1499,7 @@ func (p *peer) Start() error {
|
||||||
if !p.inbound {
|
if !p.inbound {
|
||||||
err := p.pushVersionMsg()
|
err := p.pushVersionMsg()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
p.logError("PEER: Can't send outbound version "+
|
p.logError("Can't send outbound version message %v", err)
|
||||||
"message %v", err)
|
|
||||||
p.Disconnect()
|
p.Disconnect()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue