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
246db425
Commit
246db425
authored
Jun 04, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: use state logs instead own kept logs
parent
45152dea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vm.go
tests/helper/vm.go
+3
-3
No files found.
tests/helper/vm.go
View file @
246db425
...
...
@@ -67,7 +67,7 @@ func (self *Env) GetHash(n uint64) common.Hash {
return
common
.
BytesToHash
(
crypto
.
Sha3
([]
byte
(
big
.
NewInt
(
int64
(
n
))
.
String
())))
}
func
(
self
*
Env
)
AddLog
(
log
*
state
.
Log
)
{
self
.
logs
=
append
(
self
.
logs
,
log
)
self
.
state
.
AddLog
(
log
)
}
func
(
self
*
Env
)
Depth
()
int
{
return
self
.
depth
}
func
(
self
*
Env
)
SetDepth
(
i
int
)
{
self
.
depth
=
i
}
...
...
@@ -153,7 +153,7 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log
vmenv
.
initial
=
true
ret
,
err
:=
vmenv
.
Call
(
caller
,
to
,
data
,
gas
,
price
,
value
)
return
ret
,
vmenv
.
logs
,
vmenv
.
Gas
,
err
return
ret
,
vmenv
.
state
.
Logs
()
,
vmenv
.
Gas
,
err
}
func
RunState
(
statedb
*
state
.
StateDB
,
env
,
tx
map
[
string
]
string
)
([]
byte
,
state
.
Logs
,
*
big
.
Int
,
error
)
{
...
...
@@ -188,7 +188,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
}
statedb
.
Update
()
return
ret
,
vmenv
.
logs
,
vmenv
.
Gas
,
err
return
ret
,
vmenv
.
state
.
Logs
()
,
vmenv
.
Gas
,
err
}
type
Message
struct
{
...
...
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