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 = {
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)

View File

@ -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
}));

View File

@ -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();
// }