mark txs as in-flight.
This commit is contained in:
parent
9ada551b28
commit
294e5a5b37
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user