net: fix getdata bug.

This commit is contained in:
Christopher Jeffrey 2017-01-10 16:12:42 -08:00
parent c605638daf
commit eabbfbf98b
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 6 additions and 0 deletions

View File

@ -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);
};

View File

@ -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,