From e461e443039fd586bb567c18fd3d149e5e32b5aa Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 20 Jan 2016 13:58:11 -0800 Subject: [PATCH] save memory by not storing prevBlock. --- lib/bcoin/chain.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 53d3e7eb..091aa532 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -61,7 +61,7 @@ function Chain(options) { { hash: network.genesis.hash, version: network.genesis.version, - prevBlock: network.genesis.prevBlock, + // prevBlock: network.genesis.prevBlock, ts: network.genesis.ts, bits: network.genesis.bits, height: 0 @@ -349,7 +349,7 @@ Chain.prototype.add = function add(block, peer) { entry = new ChainBlock(this, { hash: hash, version: block.version, - prevBlock: prevHash, + // prevBlock: prevHash, ts: block.ts, bits: block.bits, height: prevHeight + 1 @@ -872,7 +872,7 @@ function ChainBlock(chain, data) { this.chain = chain; this.hash = data.hash; this.version = data.version; - this.prevBlock = data.prevBlock; + // this.prevBlock = data.prevBlock; this.ts = data.ts; this.bits = data.bits; this.height = data.height; @@ -950,7 +950,7 @@ ChainBlock.prototype.toJSON = function() { return { hash: this.hash, version: this.version, - prevBlock: this.prevBlock, + // prevBlock: this.prevBlock, ts: this.ts, bits: this.bits, height: this.height