Commit ff588cec authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #833 from holgerd77/fix-block-gas-limit-update

Don't run blockgaslimit update requests on provider set to vm
parents d3487207 d91c5413
...@@ -147,6 +147,7 @@ function ExecutionContext () { ...@@ -147,6 +147,7 @@ function ExecutionContext () {
this.blockGasLimitDefault = 4300000 this.blockGasLimitDefault = 4300000
this.blockGasLimit = this.blockGasLimitDefault this.blockGasLimit = this.blockGasLimitDefault
setInterval(() => { setInterval(() => {
if (this.getProvider() !== 'vm') {
web3.eth.getBlock('latest', (err, block) => { web3.eth.getBlock('latest', (err, block) => {
if (!err) { if (!err) {
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506 // we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
...@@ -155,6 +156,7 @@ function ExecutionContext () { ...@@ -155,6 +156,7 @@ function ExecutionContext () {
this.blockGasLimit = this.blockGasLimitDefault this.blockGasLimit = this.blockGasLimitDefault
} }
}) })
}
}, 15000) }, 15000)
function setProviderFromEndpoint (endpoint) { function setProviderFromEndpoint (endpoint) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment