Changed i -> index in Transaction.prototype.sign

This commit is contained in:
vub 2013-10-08 06:48:31 -04:00
parent 038f8d5d99
commit 50f6333b0e
2 changed files with 3 additions and 3 deletions

2
bitcoinjs-min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -484,7 +484,7 @@ Transaction.prototype.sign = function(index, key, type) {
script = Script.createOutputScript(new Address(hash160)),
hash = this.hashTransactionForSignature( script, index, type),
sig = key.sign(hash).concat([type]);
this.ins[i].script = Script.createInputScript(sig,pub);
this.ins[index].script = Script.createInputScript(sig,pub);
}
/**
@ -504,7 +504,7 @@ Transaction.prototype.multisign = Transaction.prototype.p2shsign;
Transaction.prototype.validateSig = function(index,script,sig,pub) {
script = new Script(script);
var hash = this.hashTransactionForSignature(script,i,1);
var hash = this.hashTransactionForSignature(script,index,1);
return ECDSA.verify(hash, conv.coerceToBytes(sig),
conv.coerceToBytes(pub));
}