Browse Source

Merge pull request #1200 from dcousens/patch-1

sighash: remove dead branch
patch-2
Manuel Aráoz 10 years ago
parent
commit
c53b9861d3
  1. 5
      lib/transaction/sighash.js

5
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;

Loading…
Cancel
Save