pool: fix handleGetBlocks.

This commit is contained in:
Christopher Jeffrey 2018-08-10 16:28:23 -07:00
parent 92feb1be52
commit 85ed59c842
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1908,11 +1908,11 @@ class Pool extends EventEmitter {
const blocks = [];
while (hash) {
blocks.push(new InvItem(invTypes.BLOCK, hash));
if (packet.stop && hash.equals(packet.stop))
break;
blocks.push(new InvItem(invTypes.BLOCK, hash));
if (blocks.length === 500) {
peer.hashContinue = hash;
break;