pool: fix getblocks.
This commit is contained in:
parent
0c055ba236
commit
4a45290f36
@ -1435,14 +1435,14 @@ Pool.prototype.handleGetBlocks = co(function* handleGetBlocks(peer, packet) {
|
|||||||
while (hash) {
|
while (hash) {
|
||||||
blocks.push(new InvItem(invTypes.BLOCK, hash));
|
blocks.push(new InvItem(invTypes.BLOCK, hash));
|
||||||
|
|
||||||
if (hash === packet.stop)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (blocks.length === 500) {
|
if (blocks.length === 500) {
|
||||||
peer.hashContinue = hash;
|
peer.hashContinue = hash;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hash === packet.stop)
|
||||||
|
break;
|
||||||
|
|
||||||
hash = yield this.chain.db.getNextHash(hash);
|
hash = yield this.chain.db.getNextHash(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user