minor.
This commit is contained in:
parent
141dbcb65e
commit
1afb9dbc27
@ -25,8 +25,11 @@ function Input(options, tx) {
|
|||||||
this.witness = bcoin.script.witness(options.witness);
|
this.witness = bcoin.script.witness(options.witness);
|
||||||
this._mutable = !tx || (tx instanceof bcoin.mtx);
|
this._mutable = !tx || (tx instanceof bcoin.mtx);
|
||||||
|
|
||||||
if (options.coin)
|
if (options.coin) {
|
||||||
this.coin = bcoin.coin(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))
|
if (Buffer.isBuffer(this.prevout.hash))
|
||||||
this.prevout.hash = utils.toHex(this.prevout.hash);
|
this.prevout.hash = utils.toHex(this.prevout.hash);
|
||||||
@ -153,7 +156,7 @@ Input.prototype.inspect = function inspect() {
|
|||||||
var coin;
|
var coin;
|
||||||
|
|
||||||
if (this.coin) {
|
if (this.coin) {
|
||||||
coin = this.coin.inspect();
|
coin = this.coin;
|
||||||
} else {
|
} else {
|
||||||
coin = {
|
coin = {
|
||||||
type: 'unknown',
|
type: 'unknown',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user