diff --git a/server/web3service/blockchain.js b/server/web3service/blockchain.js index 5a85246..895781d 100644 --- a/server/web3service/blockchain.js +++ b/server/web3service/blockchain.js @@ -35,6 +35,13 @@ class BlockChain { this[`${data.name}Instance`] = await this.initInstance (this.getUserAddress(), data.address, this.netDir + data.json); } + const chainId = await this.web3.eth.getChainId(); + if (chainId != this.netId) { + log.warning(util.format('net id error %s %s', + chainId, + this.netId + )); + } event.emitEvent(C.BC_INITIALIZED_EVENT); }