I am running in a private ethereum network which I
init with a
genesis.json file that contains
Now I am wondering how I can read that via web3, any suggestions? (I want to make sure the limit is set correctly).
var block = web3.eth.getBlock("latest"); console.log("gasLimit: " + block.gasLimit);
Note for web3 v1.x:
getBlock is an async function and you have to use await to get the expected result
var block = await web3.eth.getBlock("latest"); console.log("gasLimit: " + block.gasLimit);