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
6a7159f3
Commit
6a7159f3
authored
May 23, 2017
by
yann300
Committed by
GitHub
May 23, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #556 from ethereum/fixGasLimit
fix gas Limit
parents
264926dc
f12a6f78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
txRunner.js
src/app/txRunner.js
+3
-7
No files found.
src/app/txRunner.js
View file @
6a7159f3
...
@@ -75,16 +75,12 @@ TxRunner.prototype.execute = function () {
...
@@ -75,16 +75,12 @@ TxRunner.prototype.execute = function () {
}
else
{
}
else
{
// NOTE: estimateGas very likely will return a large limit if execution of the code failed
// NOTE: estimateGas very likely will return a large limit if execution of the code failed
// we want to be able to run the code in order to debug and find the cause for the failure
// we want to be able to run the code in order to debug and find the cause for the failure
var
blockGasLimit
=
Math
.
floor
(
block
.
gasLimit
-
block
.
gasLimit
/
1024
)
// we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506
// tx.gas = blockGasLimit < gasEstimation ? blockGasLimit : gasEstimation
var
blockGasLimit
=
Math
.
floor
(
block
.
gasLimit
-
(
5
*
block
.
gasLimit
)
/
1024
)
tx
.
gas
=
blockGasLimit
// that's temporary, uncomment when the following is fixed https://github.com/ethereum/go-ethereum/issues/3653
tx
.
gas
=
blockGasLimit
/* same as above
if
(
tx
.
gas
>
gasLimit
)
{
if
(
tx
.
gas
>
gasLimit
)
{
return
callback
(
'Gas required exceeds limit: '
+
tx
.
gas
)
return
callback
(
'Gas required exceeds limit: '
+
tx
.
gas
)
}
}
*/
var
sendTransaction
=
self
.
personalMode
?
self
.
web3
.
personal
.
sendTransaction
:
self
.
web3
.
eth
.
sendTransaction
var
sendTransaction
=
self
.
personalMode
?
self
.
web3
.
personal
.
sendTransaction
:
self
.
web3
.
eth
.
sendTransaction
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
sendTransaction
(
tx
,
function
(
err
,
resp
)
{
if
(
err
)
{
if
(
err
)
{
...
...
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