Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
1c3ca3ce
Commit
1c3ca3ce
authored
Aug 13, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xeth: max gas limit
parent
cd81356a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
xeth.go
xeth/xeth.go
+9
-5
No files found.
xeth/xeth.go
View file @
1c3ca3ce
...
...
@@ -823,18 +823,22 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
}
from
.
SetBalance
(
common
.
MaxBig
)
from
.
SetGasLimit
(
self
.
backend
.
ChainManager
()
.
GasLimit
())
from
.
SetGasLimit
(
common
.
MaxBig
)
msg
:=
callmsg
{
from
:
from
,
to
:
common
.
HexToAddress
(
toStr
),
gas
:
common
.
Big
(
gasStr
),
gasPrice
:
common
.
Big
(
gasPriceStr
),
value
:
common
.
Big
(
valueStr
),
data
:
common
.
FromHex
(
dataStr
),
}
if
len
(
toStr
)
>
0
{
addr
:=
common
.
HexToAddress
(
toStr
)
msg
.
to
=
&
addr
}
if
msg
.
gas
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
msg
.
gas
=
DefaultGas
(
)
msg
.
gas
=
big
.
NewInt
(
50000000
)
}
if
msg
.
gasPrice
.
Cmp
(
big
.
NewInt
(
0
))
==
0
{
...
...
@@ -998,7 +1002,7 @@ func (self *XEth) sign(tx *types.Transaction, from common.Address, didUnlock boo
// callmsg is the message type used for call transations.
type
callmsg
struct
{
from
*
state
.
StateObject
to
common
.
Address
to
*
common
.
Address
gas
,
gasPrice
*
big
.
Int
value
*
big
.
Int
data
[]
byte
...
...
@@ -1007,7 +1011,7 @@ type callmsg struct {
// accessor boilerplate to implement core.Message
func
(
m
callmsg
)
From
()
(
common
.
Address
,
error
)
{
return
m
.
from
.
Address
(),
nil
}
func
(
m
callmsg
)
Nonce
()
uint64
{
return
m
.
from
.
Nonce
()
}
func
(
m
callmsg
)
To
()
*
common
.
Address
{
return
&
m
.
to
}
func
(
m
callmsg
)
To
()
*
common
.
Address
{
return
m
.
to
}
func
(
m
callmsg
)
GasPrice
()
*
big
.
Int
{
return
m
.
gasPrice
}
func
(
m
callmsg
)
Gas
()
*
big
.
Int
{
return
m
.
gas
}
func
(
m
callmsg
)
Value
()
*
big
.
Int
{
return
m
.
value
}
...
...
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