From 9c64b620787bd16c363df80b95f630858ddbc3c8 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 6 Mar 2016 01:49:13 -0800 Subject: [PATCH] remove old code. --- lib/bcoin/blockdb.js | 2 +- lib/bcoin/peer.js | 7 +------ lib/bcoin/pool.js | 9 ++------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/lib/bcoin/blockdb.js b/lib/bcoin/blockdb.js index ebde8fcd..32555022 100644 --- a/lib/bcoin/blockdb.js +++ b/lib/bcoin/blockdb.js @@ -43,7 +43,7 @@ function BlockDB(node, options) { this.cache = { unspent: new bcoin.lru(32 * 1024 * 1024, function() { return 80; }), - tx: new bcoin.lru(32 * 1024 * 1024, function(tx) { return tx.getSize(); }) + tx: new bcoin.lru(32 * 1024 * 1024, function(key, tx) { return tx.getSize(); }) }; if (+process.env.BCOIN_FRESH === 1 && bcoin.cp) diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index ac91dc1d..68c17246 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -144,14 +144,9 @@ Peer.prototype._init = function init() { self.pool.setMisbehavior(self, 100); }); - this.once('version', function() { - utils.debug( - 'Sent version (%s): height=%s', - self.host, this.pool.chain.height); - }); + this.challenge = utils.nonce(); this._ping.timer = setInterval(function() { - self.challenge = utils.nonce(); self._write(self.framer.ping({ nonce: self.challenge })); diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index 21583c01..6e9e6f63 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -314,13 +314,8 @@ Pool.prototype.resolveOrphan = function resolveOrphan(peer, top, orphan, callbac // return callback(); // } - if (self.chain.hasPending(orphan.soil)) { - utils.debug('Already processing orphan "soil".'); - return callback(); - } - - // if (self.chain.has(orphan.soil)) { - // utils.debug('Already have orphan "soil". Race condition?'); + // if (self.chain.hasPending(orphan.soil)) { + // utils.debug('Already processing orphan "soil".'); // return callback(); // }