remove old code.
This commit is contained in:
parent
51b2e1f9a9
commit
9c64b62078
@ -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)
|
||||||
|
|||||||
@ -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
|
||||||
}));
|
}));
|
||||||
|
|||||||
@ -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();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user