From 36029b8882b0580030f4a943249c8460c46db1c8 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 15 Jul 2016 18:51:44 -0700 Subject: [PATCH] fix mutable tx parsing. --- lib/bcoin/tx.js | 4 ++++ 1 file changed, 4 insertions(+) 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;