Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
d91c5413
Commit
d91c5413
authored
Sep 27, 2017
by
holgerd77
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't run blockgaslimit update requests on provider set to vm
parent
d3487207
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
execution-context.js
src/execution-context.js
+10
-8
No files found.
src/execution-context.js
View file @
d91c5413
...
@@ -147,14 +147,16 @@ function ExecutionContext () {
...
@@ -147,14 +147,16 @@ function ExecutionContext () {
this
.
blockGasLimitDefault
=
4300000
this
.
blockGasLimitDefault
=
4300000
this
.
blockGasLimit
=
this
.
blockGasLimitDefault
this
.
blockGasLimit
=
this
.
blockGasLimitDefault
setInterval
(()
=>
{
setInterval
(()
=>
{
web3
.
eth
.
getBlock
(
'latest'
,
(
err
,
block
)
=>
{
if
(
this
.
getProvider
()
!==
'vm'
)
{
if
(
!
err
)
{
web3
.
eth
.
getBlock
(
'latest'
,
(
err
,
block
)
=>
{
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
if
(
!
err
)
{
this
.
blockGasLimit
=
(
block
&&
block
.
gasLimit
)
?
Math
.
floor
(
block
.
gasLimit
-
(
5
*
block
.
gasLimit
)
/
1024
)
:
this
.
blockGasLimitDefault
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
}
else
{
this
.
blockGasLimit
=
(
block
&&
block
.
gasLimit
)
?
Math
.
floor
(
block
.
gasLimit
-
(
5
*
block
.
gasLimit
)
/
1024
)
:
this
.
blockGasLimitDefault
this
.
blockGasLimit
=
this
.
blockGasLimitDefault
}
else
{
}
this
.
blockGasLimit
=
this
.
blockGasLimitDefault
})
}
})
}
},
15000
)
},
15000
)
function
setProviderFromEndpoint
(
endpoint
)
{
function
setProviderFromEndpoint
(
endpoint
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment