diff --git a/lib/mempool/mempool.js b/lib/mempool/mempool.js index 0e0cd0c6..17567770 100644 --- a/lib/mempool/mempool.js +++ b/lib/mempool/mempool.js @@ -666,10 +666,10 @@ Mempool.prototype.addTX = co(function* addTX(tx) { */ Mempool.prototype._addTX = co(function* _addTX(tx) { - var result; + var missing; try { - result = yield this.insertTX(tx); + missing = yield this.insertTX(tx); } catch (err) { if (err.type === 'VerifyError') { if (!tx.hasWitness() && !err.malleated) @@ -682,6 +682,8 @@ Mempool.prototype._addTX = co(function* _addTX(tx) { yield this.cache.flush(); this.lastUpdate = util.now(); } + + return missing; }); /**