diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index 3a827e89..8f4b0e33 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -2020,6 +2020,8 @@ TX.prototype.fromRaw = function fromRaw(data) { this._raw = p.endData(); this._size = this._raw.length; this._witnessSize = 0; + } else { + p.end(); } return this; @@ -2079,6 +2081,8 @@ TX.prototype.fromWitness = function fromWitness(data) { this._raw = p.endData(); this._size = this._raw.length; this._witnessSize = witnessSize; + } else { + p.end(); } return this;