From 15579a6b21415dc7981f55148efb2b518478b2e4 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 15 Jan 2017 16:26:25 -0800 Subject: [PATCH] outpoint: minor. --- lib/primitives/outpoint.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/primitives/outpoint.js b/lib/primitives/outpoint.js index db07be5e..c0013035 100644 --- a/lib/primitives/outpoint.js +++ b/lib/primitives/outpoint.js @@ -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;