From 9ac406aa2d3050fa7099524522921009138d3a0f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 16 May 2016 05:05:33 -0700 Subject: [PATCH] move checkInputs for accuracy. --- lib/bcoin/mempool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index 878c4c73..d018d13a 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -1005,9 +1005,6 @@ Mempool.prototype.verify = function verify(entry, callback) { if (self.rejectAbsurdFees && fee > minRelayFee * 10000) return callback(new VerifyError(tx, 'highfee', 'absurdly-high-fee', 0)); - if (!tx.checkInputs(height, ret)) - return callback(new VerifyError(tx, 'invalid', ret.reason, ret.score)); - self.countAncestors(tx, function(err, count) { if (err) return callback(err); @@ -1019,6 +1016,9 @@ Mempool.prototype.verify = function verify(entry, callback) { 0)); } + if (!tx.checkInputs(height, ret)) + return callback(new VerifyError(tx, 'invalid', ret.reason, ret.score)); + // Do this in the worker pool. tx.verifyAsync(null, true, flags, function(err, result) { if (err)