diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index 339413bd..9eae20d5 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -103,7 +103,7 @@ TX.prototype.hash = function hash(enc, force) { TX.prototype.render = function render(force) { if (!force && this.network && this._raw) - return this._raw.slice(); + return utils.toArray(this._raw).slice(); return bcoin.protocol.framer.tx(this); }; @@ -1441,10 +1441,10 @@ TX.prototype.avoidFeeSnipping = function avoidFeeSnipping() { if (!this.chain) return; - this.locktime = this.chain.height(); + this.setLocktime(this.chain.height()); if ((Math.random() * 10 | 0) === 0) - this.locktime = Math.max(0, this.locktime - (Math.random() * 100 | 0)); + this.setLocktime(Math.max(0, this.locktime - (Math.random() * 100 | 0))); }; TX.prototype.setLocktime = function setLocktime(locktime) {