From c7c58307f058a28f9bbb61de1d3879c995058ee9 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Thu, 5 Feb 2015 13:29:28 +1100 Subject: [PATCH] TxBuilder: avoid unnecessary assertion, already done in classification --- src/transaction_builder.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transaction_builder.js b/src/transaction_builder.js index a33f786..5f6571f 100644 --- a/src/transaction_builder.js +++ b/src/transaction_builder.js @@ -20,14 +20,13 @@ function extractInput(txIn) { var prevOutType = scripts.classifyInput(scriptSig, true) var scriptType - // Re-classify if P2SH + // Re-classify if scriptHash if (prevOutType === 'scripthash') { redeemScript = Script.fromBuffer(scriptSig.chunks.slice(-1)[0]) prevOutScript = scripts.scriptHashOutput(redeemScript.getHash()) scriptSig = Script.fromChunks(scriptSig.chunks.slice(0, -1)) scriptType = scripts.classifyInput(scriptSig, true) - assert.equal(scripts.classifyOutput(redeemScript), scriptType, 'Non-matching scriptSig and scriptPubKey in input') } else { scriptType = prevOutType