From 05939b5f24ae8185ea4116a9efcbf4faa58dfbf9 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 24 Feb 2016 14:30:10 -0800 Subject: [PATCH] framer instead of render. --- lib/bcoin/tx.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index ee4645bc..1f9c8cc7 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -227,7 +227,7 @@ TX.prototype.signatureHash = function signatureHash(index, s, type) { copy.inputs.length = 1; } - copy = copy.render(); + copy = bcoin.protocol.framer.tx(copy); msg = new Buffer(copy.length + 4); utils.copy(copy, msg, 0); @@ -251,7 +251,8 @@ TX.prototype.tbsHash = function tbsHash(enc, force) { copy.inputs[i].script = []; } - this._tbsHash = utils.dsha256(copy.render()); + copy = bcoin.protocol.framer.tx(copy); + this._tbsHash = utils.dsha256(copy); } return enc === 'hex'