remove old code.

This commit is contained in:
Christopher Jeffrey 2016-03-06 01:49:13 -08:00
parent 51b2e1f9a9
commit 9c64b62078
3 changed files with 4 additions and 14 deletions

View File

@ -43,7 +43,7 @@ function BlockDB(node, options) {
this.cache = { this.cache = {
unspent: new bcoin.lru(32 * 1024 * 1024, function() { return 80; }), 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) if (+process.env.BCOIN_FRESH === 1 && bcoin.cp)

View File

@ -144,14 +144,9 @@ Peer.prototype._init = function init() {
self.pool.setMisbehavior(self, 100); self.pool.setMisbehavior(self, 100);
}); });
this.once('version', function() { this.challenge = utils.nonce();
utils.debug(
'Sent version (%s): height=%s',
self.host, this.pool.chain.height);
});
this._ping.timer = setInterval(function() { this._ping.timer = setInterval(function() {
self.challenge = utils.nonce();
self._write(self.framer.ping({ self._write(self.framer.ping({
nonce: self.challenge nonce: self.challenge
})); }));

View File

@ -314,13 +314,8 @@ Pool.prototype.resolveOrphan = function resolveOrphan(peer, top, orphan, callbac
// return callback(); // return callback();
// } // }
if (self.chain.hasPending(orphan.soil)) { // if (self.chain.hasPending(orphan.soil)) {
utils.debug('Already processing orphan "soil".'); // utils.debug('Already processing orphan "soil".');
return callback();
}
// if (self.chain.has(orphan.soil)) {
// utils.debug('Already have orphan "soil". Race condition?');
// return callback(); // return callback();
// } // }