sighash: remove dead branch
This commit is contained in:
parent
86089355ad
commit
05a8cf9630
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue