docs. minor.

This commit is contained in:
Christopher Jeffrey 2016-05-03 21:15:53 -07:00
parent 9c3b0b1440
commit e67a16c2bd
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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}
*/