net: fix getdata bug.
This commit is contained in:
parent
c605638daf
commit
eabbfbf98b
@ -1352,6 +1352,9 @@ Peer.prototype.getItems = function getItems(type, hashes) {
|
||||
items.push(new InvItem(type, hash));
|
||||
}
|
||||
|
||||
if (items.length === 0)
|
||||
return;
|
||||
|
||||
this.getData(items);
|
||||
};
|
||||
|
||||
|
||||
@ -1727,6 +1727,9 @@ Pool.prototype.getTX = function getTX(peer, hashes) {
|
||||
items.push(hash);
|
||||
}
|
||||
|
||||
if (items.length === 0)
|
||||
return;
|
||||
|
||||
this.logger.debug(
|
||||
'Requesting %d/%d txs from peer with getdata (%s).',
|
||||
items.length,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user