From e033a872c9c6f99113466440ebc3fb793a29ce5e Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sun, 4 May 2014 15:03:24 +1000 Subject: [PATCH] Transaction: rename hashTransactionForSignature to hashForSignature --- src/transaction.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transaction.js b/src/transaction.js index b21f851..0b336cf 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -204,7 +204,7 @@ var SIGHASH_ANYONECANPAY = 80 * hashType, serializes and finally hashes the result. This hash can then be * used to sign the transaction input in question. */ -Transaction.prototype.hashTransactionForSignature = +Transaction.prototype.hashForSignature = function (connectedScript, inIndex, hashType) { var txTmp = this.clone() @@ -377,7 +377,7 @@ Transaction.prototype.signScriptSig = function(index, script, key, type) { assert(key instanceof ECKey, 'Invalid private key') // assert.equal(type & 0x7F, type, 'Invalid type') // TODO - var hash = this.hashTransactionForSignature(script, index, type) + var hash = this.hashForSignature(script, index, type) return key.sign(hash).concat([type]) } @@ -387,7 +387,7 @@ Transaction.prototype.setScriptSig = function(index, script) { Transaction.prototype.validateSig = function(index, script, pub, sig, type) { type = type || SIGHASH_ALL - var hash = this.hashTransactionForSignature(script, index, type) + var hash = this.hashForSignature(script, index, type) return pub.verify(hash, sig) }