From b55e3a0245323677c09b0465bd746e04863c6a96 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 4 Feb 2015 20:06:21 +1100 Subject: [PATCH] TxBuilder: missing redeemScript not an issue if already added If the input is initialized, we already have the redeemScript, no need to pass it in again --- src/transaction_builder.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/transaction_builder.js b/src/transaction_builder.js index 76cd271..b8616dd 100644 --- a/src/transaction_builder.js +++ b/src/transaction_builder.js @@ -289,13 +289,6 @@ TransactionBuilder.prototype.sign = function(index, privKey, redeemScript, hashT // are we already initialized? if (input.initialized) { - if (input.prevOutType === 'scripthash') { - assert(input.redeemScript, 'PrevOutScript is P2SH, missing redeemScript') - - } else { - assert(!input.redeemScript, 'PrevOutScript must be P2SH') - } - // redeemScript only needed to initialize, but if provided again, enforce consistency if (redeemScript) { assert.deepEqual(input.redeemScript, redeemScript, 'Inconsistent redeemScript')