bip152: do not use Block.totalTX.

This commit is contained in:
Christopher Jeffrey 2017-03-16 15:46:16 -07:00
parent 8453c250dc
commit f778a8c1b5
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -485,7 +485,6 @@ CompactBlock.prototype.toBlock = function toBlock() {
block.ts = this.ts;
block.bits = this.bits;
block.nonce = this.nonce;
block.totalTX = this.totalTX;
block._hash = this._hash;
block._hhash = this._hhash;
@ -516,7 +515,7 @@ CompactBlock.prototype.fromBlock = function fromBlock(block, witness, nonce) {
this.ts = block.ts;
this.bits = block.bits;
this.nonce = block.nonce;
this.totalTX = block.totalTX;
this.totalTX = block.txs.length;
this._hash = block._hash;
this._hhash = block._hhash;