Unverified Commit 37162ad0 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #691 from ethereum/fixtapetest

Do not poll in this version of execution context
parents f241435a 82650b20
{
"name": "remix-lib",
"version": "0.1.3",
"version": "0.1.4",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
......
......@@ -186,18 +186,18 @@ function ExecutionContext () {
this.blockGasLimitDefault = 4300000
this.blockGasLimit = this.blockGasLimitDefault
setInterval(() => {
if (this.getProvider() !== 'vm') {
web3.eth.getBlock('latest', (err, block) => {
if (!err) {
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
this.blockGasLimit = (block && block.gasLimit) ? Math.floor(block.gasLimit - (5 * block.gasLimit) / 1024) : this.blockGasLimitDefault
} else {
this.blockGasLimit = this.blockGasLimitDefault
}
})
}
}, 15000)
// removing the setinterval cause it cause tape test to hang and we don't need this.
// there's a copy of this file in remix-ide repo @TODO to refactor
if (this.getProvider() !== 'vm') {
web3.eth.getBlock('latest', (err, block) => {
if (!err) {
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
this.blockGasLimit = (block && block.gasLimit) ? Math.floor(block.gasLimit - (5 * block.gasLimit) / 1024) : this.blockGasLimitDefault
} else {
this.blockGasLimit = this.blockGasLimitDefault
}
})
}
// TODO: not used here anymore and needs to be moved
function setProviderFromEndpoint (endpoint, context, cb) {
......
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