comments. remove useless variable.

This commit is contained in:
Christopher Jeffrey 2016-01-02 00:23:55 -08:00
parent 9976208d0d
commit ff16271c1a

View File

@ -354,6 +354,7 @@ Pool.prototype._handleBlock = function _handleBlock(block, peer) {
if (!this.options.fullNode)
return;
// Emulate bip37 - emit all the "watched" txs
if (this.listeners('watched').length > 0) {
utils.nextTick(function() {
block.txs.forEach(function(tx) {
@ -363,8 +364,6 @@ Pool.prototype._handleBlock = function _handleBlock(block, peer) {
});
}
backoff = 0;
this._response(block);
hash = block.hash('hex');
@ -378,12 +377,18 @@ Pool.prototype._handleBlock = function _handleBlock(block, peer) {
this.emit('_block', block, peer);
if (this.chain.hasOrphan(block)) {
peer.loadBlocks(this.chain.locatorHashes(), this.chain.getOrphanRoot(block));
// Resolve orphan chain
peer.loadBlocks(
this.chain.locatorHashes(),
this.chain.getOrphanRoot(block)
);
// Emit our orphan if it is new
if (!orphan)
this.emit('orphan', block, peer);
return;
}
// Do not emit if nothing was added to the chain
if (this.chain.size() === size)
return;