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