From 4a45290f3666ba6939281b6307eadfbff24c30ae Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 20 Jan 2017 16:58:14 -0800 Subject: [PATCH] pool: fix getblocks. --- lib/net/pool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net/pool.js b/lib/net/pool.js index de2a06ec..b7b96461 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -1435,14 +1435,14 @@ Pool.prototype.handleGetBlocks = co(function* handleGetBlocks(peer, packet) { while (hash) { blocks.push(new InvItem(invTypes.BLOCK, hash)); - if (hash === packet.stop) - break; - if (blocks.length === 500) { peer.hashContinue = hash; break; } + if (hash === packet.stop) + break; + hash = yield this.chain.db.getNextHash(hash); }