net: avoid 0-len getdatas for blocks.

This commit is contained in:
Christopher Jeffrey 2017-01-14 06:53:51 -08:00
parent 07414f5fd3
commit 80d01b52c3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1845,6 +1845,9 @@ Pool.prototype.sendBlockRequests = function sendBlockRequests(peer) {
peer.blockQueue = queue.slice(i);
if (hashes.length === 0)
return;
this.logger.debug(
'Requesting %d/%d blocks from peer with getdata (%s).',
hashes.length,