fix: only log if peer was not flagged for abuse

This commit is contained in:
Derrick Hammer 2024-01-15 13:49:07 -05:00
parent 7d34ac37db
commit d0d6745d60
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -424,7 +424,9 @@ func (p *P2PImpl) OnNewPeerListen(peer net.Peer, verifyId bool) {
}) })
onError := net.ErrorCallback(func(args ...interface{}) { onError := net.ErrorCallback(func(args ...interface{}) {
p.logger.Error("peer error", zap.Any("args", args)) if !peer.Abused() {
p.logger.Error("peer error", zap.Any("args", args))
}
}) })
peer.ListenForMessages(func(message []byte) error { peer.ListenForMessages(func(message []byte) error {