optimize witness serialization.

This commit is contained in:
Christopher Jeffrey 2016-07-15 18:56:38 -07:00
parent 36029b8882
commit 98eeaf0af3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2172,11 +2172,12 @@ TX.prototype.frameWitness = function frameWitness(writer) {
for (i = 0; i < this.outputs.length; i++)
this.outputs[i].toRaw(p);
for (i = 0; i < this.inputs.length; i++) {
start = p.written;
start = p.written;
for (i = 0; i < this.inputs.length; i++)
this.inputs[i].witness.toRaw(p);
witnessSize += p.written - start;
}
witnessSize += p.written - start;
p.writeU32(this.locktime);