mark txs as in-flight.

This commit is contained in:
Christopher Jeffrey 2016-01-29 13:10:06 -08:00
parent 9ada551b28
commit 294e5a5b37

View File

@ -812,7 +812,9 @@ Pool.prototype._createPeer = function _createPeer(backoff, priority) {
});
peer.on('tx', function(tx) {
self._response(tx);
if (self._response(tx))
utils.debug('Received request TX: %s', tx.rhash);
self.emit('tx', tx, peer);
if (!self.options.fullNode && tx.block)
@ -830,12 +832,10 @@ Pool.prototype._createPeer = function _createPeer(backoff, priority) {
peer.on('txs', function(txs) {
self.emit('txs', txs, peer);
peer.getData(txs.map(function(hash) {
return {
type: 'tx',
hash: hash
};
}));
txs.forEach(function(hash) {
self._request('tx', hash);
});
self._scheduleRequests();
});
peer.on('version', function(version) {