From 3baaeadd1478e78eb8d5637b19c7cbb558dfd9d6 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 20 Dec 2016 00:40:49 -0800 Subject: [PATCH] tx: comments and addr fixes. --- lib/primitives/tx.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/primitives/tx.js b/lib/primitives/tx.js index ad562f20..6be7463f 100644 --- a/lib/primitives/tx.js +++ b/lib/primitives/tx.js @@ -409,6 +409,7 @@ TX.prototype.hasWitness = function hasWitness() { * @param {Script} prev - Previous output script or redeem script * (in the case of witnesspubkeyhash, this should be the generated * p2pkh script). + * @param {Amount} value - Previous output value. * @param {SighashType} type - Sighash type. * @param {Number} version - Sighash version (0=legacy, 1=segwit). * @returns {Buffer} Signature hash. @@ -608,6 +609,7 @@ TX.prototype.hashSize = function hashSize(index, prev, type) { * @private * @param {Number} index * @param {Script} prev + * @param {Amount} value * @param {SighashType} type * @returns {Buffer} */ @@ -1079,7 +1081,7 @@ TX.prototype.getHashes = function getHashes(view, enc) { return Object.keys(table); } - hashes = this.getAddresses(); + hashes = this.getAddresses(view); for (i = 0; i < hashes.length; i++) hashes[i] = hashes[i].getHash();