pool: disable alert on main. see bitcoin/bitcoin#7692.

This commit is contained in:
Christopher Jeffrey 2016-08-25 03:37:33 -07:00
parent 455dc027ee
commit 7c1c2b2d15
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1241,6 +1241,16 @@ Pool.prototype._handleAlert = function _handleAlert(alert, peer) {
}
}
// Keep alert disabled on main.
if (this.network.type === 'main') {
// https://github.com/bitcoin/bitcoin/pull/7692#issuecomment-197967429
this.logger.warning('The Japanese government sent an alert packet.');
this.logger.warning('Here is their IP: %s.', peer.hostname);
this.logger.info(alert);
peer.setMisbehavior(100);
return;
}
this.logger.warning('Received alert from peer (%s).', peer.hostname);
this.logger.warning(alert);