outpoint: minor.

This commit is contained in:
Christopher Jeffrey 2017-01-15 16:26:25 -08:00
parent 858081626f
commit 15579a6b21
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -245,6 +245,7 @@ Outpoint.fromJSON = function fromJSON(json) {
Outpoint.prototype.fromTX = function fromTX(tx, index) {
assert(tx);
assert(typeof index === 'number');
assert(index >= 0);
this.hash = tx.hash('hex');
this.index = index;
return this;