diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index 7ea94ed7..2472920a 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -351,6 +351,7 @@ Peer.prototype._handleInv = function handleInv(items) { if (txs.length === 0) return; + this.emit('txs', txs); this.getData(txs); }; diff --git a/lib/bcoin/pool.js b/lib/bcoin/pool.js index f9dcd202..8e8620b0 100644 --- a/lib/bcoin/pool.js +++ b/lib/bcoin/pool.js @@ -314,6 +314,14 @@ Pool.prototype._addPeer = function _addPeer(backoff) { peer.on('addr', function(addr) { self.emit('addr', addr); }); + + peer.on('blocks', function(blocks) { + self.emit('blocks', blocks); + }); + + peer.on('txs', function(txs) { + self.emit('txs', txs); + }); }; Pool.prototype._removePeer = function _removePeer(peer) {