From 1afb9dbc2779c7309251de9ab379b82bd2b588ec Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 5 Apr 2016 05:04:54 -0700 Subject: [PATCH] minor. --- lib/bcoin/input.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/input.js b/lib/bcoin/input.js index f7b4eeac..eba9ce51 100644 --- a/lib/bcoin/input.js +++ b/lib/bcoin/input.js @@ -25,8 +25,11 @@ function Input(options, tx) { this.witness = bcoin.script.witness(options.witness); this._mutable = !tx || (tx instanceof bcoin.mtx); - if (options.coin) + if (options.coin) { this.coin = bcoin.coin(options.coin); + assert(typeof this.coin.hash === 'string'); + assert(typeof this.coin.index === 'number'); + } if (Buffer.isBuffer(this.prevout.hash)) this.prevout.hash = utils.toHex(this.prevout.hash); @@ -153,7 +156,7 @@ Input.prototype.inspect = function inspect() { var coin; if (this.coin) { - coin = this.coin.inspect(); + coin = this.coin; } else { coin = { type: 'unknown',