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
ff99752d
Commit
ff99752d
authored
May 12, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xeth: use same semantics as block processer for transient calls
parent
260536a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
xeth.go
xeth/xeth.go
+3
-4
No files found.
xeth/xeth.go
View file @
ff99752d
...
@@ -787,6 +787,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
...
@@ -787,6 +787,7 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
from
=
statedb
.
GetOrNewStateObject
(
common
.
HexToAddress
(
fromStr
))
from
=
statedb
.
GetOrNewStateObject
(
common
.
HexToAddress
(
fromStr
))
}
}
from
.
SetGasPool
(
self
.
backend
.
ChainManager
()
.
GasLimit
())
msg
:=
callmsg
{
msg
:=
callmsg
{
from
:
from
,
from
:
from
,
to
:
common
.
HexToAddress
(
toStr
),
to
:
common
.
HexToAddress
(
toStr
),
...
@@ -807,10 +808,8 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
...
@@ -807,10 +808,8 @@ func (self *XEth) Call(fromStr, toStr, valueStr, gasStr, gasPriceStr, dataStr st
block
:=
self
.
CurrentBlock
()
block
:=
self
.
CurrentBlock
()
vmenv
:=
core
.
NewEnv
(
statedb
,
self
.
backend
.
ChainManager
(),
msg
,
block
)
vmenv
:=
core
.
NewEnv
(
statedb
,
self
.
backend
.
ChainManager
(),
msg
,
block
)
initialGas
:=
new
(
big
.
Int
)
.
Set
(
msg
.
gas
)
res
,
gas
,
err
:=
core
.
ApplyMessage
(
vmenv
,
msg
,
from
)
res
,
err
:=
vmenv
.
Call
(
msg
.
from
,
msg
.
to
,
msg
.
data
,
msg
.
gas
,
msg
.
gasPrice
,
msg
.
value
)
return
common
.
ToHex
(
res
),
gas
.
String
(),
err
return
common
.
ToHex
(
res
),
initialGas
.
Sub
(
initialGas
,
msg
.
gas
)
.
String
(),
err
}
}
func
(
self
*
XEth
)
ConfirmTransaction
(
tx
string
)
bool
{
func
(
self
*
XEth
)
ConfirmTransaction
(
tx
string
)
bool
{
...
...
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