From 6b7b88d58af26791b38bb6e07e78fafedbdd54e7 Mon Sep 17 00:00:00 2001 From: Frederic Heem Date: Fri, 25 Sep 2015 08:55:35 +0100 Subject: [PATCH] don-'t call web3.eth.getBlock twice --- lib/chain_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chain_manager.js b/lib/chain_manager.js index bc93be3b2..abd0aea9b 100644 --- a/lib/chain_manager.js +++ b/lib/chain_manager.js @@ -32,7 +32,7 @@ ChainManager.prototype.init = function(env, config) { if(!block){ throw new Error("Cannot get the genesis block, is embark blockchain running ?"); } - var chainId = web3.eth.getBlock(0).hash; + var chainId = block.hash; if (this.chainManagerConfig[chainId] === undefined) { this.chainManagerConfig[chainId] = {contracts: {}};