net: avoid 0-len getdatas for blocks.
This commit is contained in:
parent
07414f5fd3
commit
80d01b52c3
@ -1845,6 +1845,9 @@ Pool.prototype.sendBlockRequests = function sendBlockRequests(peer) {
|
|||||||
|
|
||||||
peer.blockQueue = queue.slice(i);
|
peer.blockQueue = queue.slice(i);
|
||||||
|
|
||||||
|
if (hashes.length === 0)
|
||||||
|
return;
|
||||||
|
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
'Requesting %d/%d blocks from peer with getdata (%s).',
|
'Requesting %d/%d blocks from peer with getdata (%s).',
|
||||||
hashes.length,
|
hashes.length,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user