From 070af4643f55d5dff00f7fee85ca98ca13a91fc3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 18 May 2016 04:41:49 -0700 Subject: [PATCH] remove old mutable check from block.getSizes. --- lib/bcoin/block.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/bcoin/block.js b/lib/bcoin/block.js index 5f8b2aa2..95a91542 100644 --- a/lib/bcoin/block.js +++ b/lib/bcoin/block.js @@ -130,8 +130,6 @@ Block.prototype.getRaw = function getRaw() { */ Block.prototype.getSizes = function getSizes() { - var sizes; - if (this._size != null) { return { size: this._size, @@ -147,14 +145,7 @@ Block.prototype.getSizes = function getSizes() { }; } - sizes = bcoin.protocol.framer.block.sizes(this); - - if (!this.mutable) { - this._size = sizes.size; - this._witnessSize = sizes.witnessSize; - } - - return sizes; + return bcoin.protocol.framer.block.sizes(this); }; /** @@ -213,6 +204,7 @@ Block.prototype.hasWitness = function hasWitness() { if (this.txs[i].hasWitness()) return true; } + return false; };