bip152: always use witness serialization.
This commit is contained in:
parent
b939de9423
commit
a85f3edde5
@ -126,7 +126,7 @@ CompactBlock.fromRaw = function fromRaw(data, enc) {
|
||||
return new CompactBlock().fromRaw(data);
|
||||
};
|
||||
|
||||
CompactBlock.prototype.toRaw = function toRaw(witness, writer) {
|
||||
CompactBlock.prototype.toRaw = function toRaw(writer) {
|
||||
var p = bcoin.writer(writer);
|
||||
var i, id, lo, hi, ptx;
|
||||
|
||||
@ -155,10 +155,7 @@ CompactBlock.prototype.toRaw = function toRaw(witness, writer) {
|
||||
for (i = 0; i < this.ptx.length; i++) {
|
||||
ptx = this.ptx[i];
|
||||
p.writeVarint2(ptx[0]);
|
||||
if (!witness)
|
||||
ptx[1].toNormal(p);
|
||||
else
|
||||
ptx[1].toRaw(p);
|
||||
ptx[1].toRaw(p);
|
||||
}
|
||||
|
||||
if (!writer)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user