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) {
|
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);
|
self.emit('tx', tx, peer);
|
||||||
|
|
||||||
if (!self.options.fullNode && tx.block)
|
if (!self.options.fullNode && tx.block)
|
||||||
@ -830,12 +832,10 @@ Pool.prototype._createPeer = function _createPeer(backoff, priority) {
|
|||||||
|
|
||||||
peer.on('txs', function(txs) {
|
peer.on('txs', function(txs) {
|
||||||
self.emit('txs', txs, peer);
|
self.emit('txs', txs, peer);
|
||||||
peer.getData(txs.map(function(hash) {
|
txs.forEach(function(hash) {
|
||||||
return {
|
self._request('tx', hash);
|
||||||
type: 'tx',
|
});
|
||||||
hash: hash
|
self._scheduleRequests();
|
||||||
};
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
peer.on('version', function(version) {
|
peer.on('version', function(version) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user