fixes.
This commit is contained in:
parent
ed6b1e9072
commit
0cfbaf91b5
@ -168,7 +168,7 @@ Coin.parseJSON = function parseJSON(json) {
|
|||||||
version: json.version,
|
version: json.version,
|
||||||
height: json.height,
|
height: json.height,
|
||||||
value: utils.satoshi(json.value),
|
value: utils.satoshi(json.value),
|
||||||
script: bcoin.script.parseRaw(json.script, 'hex')),
|
script: bcoin.script.parseRaw(json.script, 'hex'),
|
||||||
coinbase: json.coinbase,
|
coinbase: json.coinbase,
|
||||||
hash: json.hash ? utils.revHex(json.hash) : null,
|
hash: json.hash ? utils.revHex(json.hash) : null,
|
||||||
index: json.index
|
index: json.index
|
||||||
|
|||||||
@ -155,7 +155,7 @@ Output.prototype.toJSON = function toJSON() {
|
|||||||
Output.parseJSON = function parseJSON(json) {
|
Output.parseJSON = function parseJSON(json) {
|
||||||
return {
|
return {
|
||||||
value: utils.satoshi(json.value),
|
value: utils.satoshi(json.value),
|
||||||
script: bcoin.script.parseRaw(json.script, 'hex'))
|
script: bcoin.script.parseRaw(json.script, 'hex')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ function Witness(items, mutable) {
|
|||||||
|
|
||||||
this.redeem = null;
|
this.redeem = null;
|
||||||
|
|
||||||
assert(Array.isArray(items));
|
assert(Array.isArray(this.items));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -923,7 +923,7 @@ function Script(code, mutable) {
|
|||||||
|
|
||||||
this.redeem = null;
|
this.redeem = null;
|
||||||
|
|
||||||
assert(Array.isArray(code));
|
assert(Array.isArray(this.code));
|
||||||
assert(!this.raw || Buffer.isBuffer(this.raw));
|
assert(!this.raw || Buffer.isBuffer(this.raw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user