From e67a16c2bd803d78bd15d5b567da4e51a76f59f9 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 3 May 2016 21:15:53 -0700 Subject: [PATCH] docs. minor. --- lib/bcoin/tx.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index a187dcf6..ddfcf367 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -350,8 +350,6 @@ TX.prototype.hasWitness = function hasWitness() { */ TX.prototype.signatureHash = function signatureHash(index, prev, type, version) { - assert(version >= 0 && version <= 1); - // Traditional sighashing if (version === 0) return this.signatureHashV0(index, prev, type); @@ -359,6 +357,8 @@ TX.prototype.signatureHash = function signatureHash(index, prev, type, version) // Segwit sighashing if (version === 1) return this.signatureHashV1(index, prev, type); + + assert(false, 'Unknown sighash version.'); }; TX.prototype.signatureHashV0 = function signatureHashV0(index, prev, type) { @@ -542,7 +542,7 @@ TX.prototype.signatureHashV1 = function signatureHashV1(index, prev, type) { * verified. If not present, all outputs will be verified. * @param {Boolean?} force - Force the transaction to * be verified, even if it has been confirmed. - * @param {module.script~VerifyFlags?} flags + * @param {VerifyFlags?} flags * @returns {Boolean} Whether the inputs are valid. */ @@ -604,7 +604,7 @@ TX.prototype.verify = function verify(index, force, flags) { * verified. If not present, all outputs will be verified. * @param {Boolean?} force - Force the transaction to * be verified, even if it has been confirmed. - * @param {module.script~VerifyFlags?} flags + * @param {VerifyFlags?} flags * @param {Function} callback * @returns {Boolean} Whether the inputs are valid. */ @@ -1189,7 +1189,7 @@ TX.prototype.isStandard = function isStandard(flags, ret) { * Perform contextual checks to verify coin and input * script standardness (including the redeem script). * @see AreInputsStandard() - * @param {module.script~VerifyFlags?} + * @param {VerifyFlags?} * @returns {Boolean} */