diff --git a/lib/net/bip152.js b/lib/net/bip152.js index 04d32754..f5916663 100644 --- a/lib/net/bip152.js +++ b/lib/net/bip152.js @@ -217,7 +217,7 @@ CompactBlock.prototype.toNormalWriter = function toNormalWriter(bw) { */ CompactBlock.prototype.frameRaw = function frameRaw(witness) { - var size = this.getSize(); + var size = this.getSize(witness); return this.writeRaw(new StaticWriter(size), witness).render(); }; @@ -972,7 +972,7 @@ TXResponse.prototype.writeRaw = function writeRaw(bw, witness) { */ TXResponse.prototype.frameRaw = function frameRaw(witness) { - var size = this.getSize(); + var size = this.getSize(witness); return this.writeRaw(new StaticWriter(size), witness).render(); };