From b77b814be4f299c7ad3acf541160298c90ea9cc1 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 13 Jan 2017 15:27:13 -0800 Subject: [PATCH] bip152: fix empty block filling. --- lib/net/bip152.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/net/bip152.js b/lib/net/bip152.js index a08f04fa..ea34c784 100644 --- a/lib/net/bip152.js +++ b/lib/net/bip152.js @@ -216,6 +216,9 @@ CompactBlock.prototype.fillMempool = function fillMempool(witness, mempool) { var hashes = mempool.getSnapshot(); var i, id, index, hash, tx; + if (this.count === this.totalTX) + return true; + for (i = 0; i < hashes.length; i++) { hash = hashes[i]; tx = mempool.getTX(hash);