potentially clean up misbehaving peers.

This commit is contained in:
Christopher Jeffrey 2016-01-20 02:54:52 -08:00
parent 009f4f9f72
commit ddbb7894fa

View File

@ -1631,6 +1631,15 @@ Pool.prototype.usableSeed = function usableSeed(priority, connecting) {
Pool.prototype.setSeeds = function setSeeds(seeds) {
this.seeds = [];
this.hosts = {};
// Remove all seeds from misbehaving aside
// from original seeds that may be in it.
// this.peers.misbehaving = this.originalSeeds.reduce(function(out, addr) {
// if (this.peers.misbehaving[addr.host])
// out[addr.host] = this.peers.misbehaving[addr.host];
// return out;
// }, {}, this);
seeds.forEach(function(seed) {
this.addSeed(seed);
}, this);