move checkInputs for accuracy.

This commit is contained in:
Christopher Jeffrey 2016-05-16 05:05:33 -07:00
parent f48fa2b994
commit 9ac406aa2d
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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)