From 2b41cfb9bdfbb70f037288bc8e4ddec9036f04ee Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 10 Jul 2016 11:03:26 -0700 Subject: [PATCH] temporary fix for "inverse" malleability. --- lib/bcoin/mempool.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index 982f435b..6e40018d 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -691,13 +691,6 @@ Mempool.prototype.addTX = function addTX(tx, callback, force) { } if (this.requireStandard) { - if (!tx.isStandard(ret)) { - return callback(new VerifyError(tx, - 'nonstandard', - ret.reason, - ret.score)); - } - if (!this.chain.csvActive && tx.version >= 2) { return callback(new VerifyError(tx, 'nonstandard', @@ -715,6 +708,15 @@ Mempool.prototype.addTX = function addTX(tx, callback, force) { } } + if (this.requireStandard) { + if (!tx.isStandard(ret)) { + return callback(new VerifyError(tx, + 'nonstandard', + ret.reason, + ret.score)); + } + } + this.chain.checkFinal(this.chain.tip, tx, lockFlags, function(err, isFinal) { if (err) return callback(err);