diff --git a/lib/net/peer.js b/lib/net/peer.js index d39c184b..60a3aad7 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -390,6 +390,7 @@ Peer.prototype.initConnect = function initConnect() { self.connectTimeout = setTimeout(function() { self.connectTimeout = null; + cleanup(); reject(new Error('Connection timed out.')); }, 10000); }); @@ -621,7 +622,7 @@ Peer.prototype.isLoader = function isLoader() { /** * Broadcast blocks to peer. - * @param {AbstractBlock[]} blocks + * @param {Block[]} blocks */ Peer.prototype.announceBlock = function announceBlock(blocks) { @@ -707,6 +708,7 @@ Peer.prototype.announceTX = function announceTX(txs) { continue; } + // Check the fee filter. if (this.feeRate !== -1 && this.mempool) { hash = tx.hash('hex'); entry = this.mempool.getEntry(hash);