tx: minor.

This commit is contained in:
Christopher Jeffrey 2017-09-01 18:05:50 -07:00
parent 55f594d616
commit ad4c7e81c8
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -665,9 +665,11 @@ TX.prototype.signatureHashV1 = function signatureHashV1(index, prev, value, type
if (!this.mutable)
this._hashOutputs = outputs;
}
} else if ((type & 0x1f) === hashType.SINGLE && index < this.outputs.length) {
const output = this.outputs[index];
outputs = digest.hash256(output.toRaw());
} else if ((type & 0x1f) === hashType.SINGLE) {
if (index < this.outputs.length) {
const output = this.outputs[index];
outputs = digest.hash256(output.toRaw());
}
}
const size = 156 + prev.getVarSize();