From f778a8c1b53d28a309dfbdd0e70cc7549cf4c7b1 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 16 Mar 2017 15:46:16 -0700 Subject: [PATCH] bip152: do not use Block.totalTX. --- lib/net/bip152.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/net/bip152.js b/lib/net/bip152.js index 8d92ba69..4e02441f 100644 --- a/lib/net/bip152.js +++ b/lib/net/bip152.js @@ -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;