From 05a8cf96309cec233e43e68781b49dc4454a04b7 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 27 Apr 2015 18:49:45 +1000 Subject: [PATCH] sighash: remove dead branch --- lib/transaction/sighash.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/transaction/sighash.js b/lib/transaction/sighash.js index 03c2485..7f86622 100644 --- a/lib/transaction/sighash.js +++ b/lib/transaction/sighash.js @@ -62,12 +62,9 @@ var sighash = function sighash(transaction, sighashType, inputNumber, subscript) } else if ((sighashType & 31) === Signature.SIGHASH_SINGLE) { // The SIGHASH_SINGLE bug. // https://bitcointalk.org/index.php?topic=260595.0 - if (inputNumber > txcopy.outputs.length - 1) { + if (inputNumber >= txcopy.outputs.length) { return new Buffer(SIGHASH_SINGLE_BUG, 'hex'); } - if (txcopy.outputs.length <= inputNumber) { - throw new Error('Missing output to sign'); - } txcopy.outputs.length = inputNumber + 1;