From ddbb7894fa5b0969994386a09d70e359fe50d28e Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 20 Jan 2016 02:54:52 -0800 Subject: [PATCH] potentially clean up misbehaving peers. --- lib/bcoin/pool.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 7c745e77..9720d4c2 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -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);