sighash work
This commit is contained in:
parent
397764ece6
commit
8ade973b31
@ -597,11 +597,12 @@ TX.prototype.signatureHash = function signatureHash(index, s, type) {
|
||||
type = constants.hashType[type];
|
||||
|
||||
assert(type != null);
|
||||
assert(index < copy.inputs.length)
|
||||
|
||||
// bitcoind used to return 1 as an error code:
|
||||
// it ended up being treated like a hash.
|
||||
if (index >= copy.inputs.length)
|
||||
return constants.oneHash.slice();
|
||||
// if (index >= copy.inputs.length)
|
||||
// return constants.oneHash.slice();
|
||||
|
||||
copy.inputs.forEach(function(input, i) {
|
||||
input.script = i === index ? s : [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user