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: {}};