mirror of https://github.com/embarklabs/embark.git
don-'t call web3.eth.getBlock twice
This commit is contained in:
parent
8f96834596
commit
6b7b88d58a
|
@ -32,7 +32,7 @@ ChainManager.prototype.init = function(env, config) {
|
||||||
if(!block){
|
if(!block){
|
||||||
throw new Error("Cannot get the genesis block, is embark blockchain running ?");
|
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) {
|
if (this.chainManagerConfig[chainId] === undefined) {
|
||||||
this.chainManagerConfig[chainId] = {contracts: {}};
|
this.chainManagerConfig[chainId] = {contracts: {}};
|
||||||
|
|
Loading…
Reference in New Issue