pool: logs.

This commit is contained in:
Christopher Jeffrey 2016-08-27 10:37:20 -07:00
parent d12861a552
commit df66dc1277
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1265,6 +1265,9 @@ Pool.prototype._handleAlert = function _handleAlert(alert, peer) {
&& alert.subVers.length === 0
&& alert.priority === 0x7fffffff
&& alert.statusBar === 'URGENT: Alert key compromised, upgrade required')) {
this.logger.warning('Misuse of last alert ID (%s).', peer.hostname);
this.logger.debug(alert);
peer.setMisbehavior(100);
return;
}
}
@ -1790,8 +1793,8 @@ Pool.prototype.setMisbehavior = function setMisbehavior(peer, score) {
peer.banScore += score;
if (peer.banScore >= constants.BAN_SCORE) {
this.ban(peer);
this.logger.debug('Ban threshold exceeded (%s).', peer.hostname);
this.ban(peer);
return true;
}