pool: logs.
This commit is contained in:
parent
d12861a552
commit
df66dc1277
@ -1265,6 +1265,9 @@ Pool.prototype._handleAlert = function _handleAlert(alert, peer) {
|
|||||||
&& alert.subVers.length === 0
|
&& alert.subVers.length === 0
|
||||||
&& alert.priority === 0x7fffffff
|
&& alert.priority === 0x7fffffff
|
||||||
&& alert.statusBar === 'URGENT: Alert key compromised, upgrade required')) {
|
&& 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1790,8 +1793,8 @@ Pool.prototype.setMisbehavior = function setMisbehavior(peer, score) {
|
|||||||
peer.banScore += score;
|
peer.banScore += score;
|
||||||
|
|
||||||
if (peer.banScore >= constants.BAN_SCORE) {
|
if (peer.banScore >= constants.BAN_SCORE) {
|
||||||
this.ban(peer);
|
|
||||||
this.logger.debug('Ban threshold exceeded (%s).', peer.hostname);
|
this.logger.debug('Ban threshold exceeded (%s).', peer.hostname);
|
||||||
|
this.ban(peer);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user