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
d890258a
Commit
d890258a
authored
Jun 23, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to vm output
parent
803e4807
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
vm.go
ethchain/vm.go
+6
-8
No files found.
ethchain/vm.go
View file @
d890258a
...
...
@@ -358,10 +358,10 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
case
NOT
:
require
(
1
)
x
:=
stack
.
Pop
()
if
x
.
Cmp
(
ethutil
.
BigFalse
)
==
0
{
stack
.
Push
(
ethutil
.
BigTrue
)
}
else
{
if
x
.
Cmp
(
ethutil
.
BigFalse
)
>
0
{
stack
.
Push
(
ethutil
.
BigFalse
)
}
else
{
stack
.
Push
(
ethutil
.
BigTrue
)
}
// 0x10 range
...
...
@@ -542,16 +542,14 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
require
(
1
)
loc
:=
stack
.
Pop
()
val
:=
closure
.
GetMem
(
loc
)
stack
.
Push
(
val
.
BigInt
())
vm
.
Printf
(
" {0x%x} 0x%x"
,
loc
.
Bytes
(),
val
)
vm
.
Printf
(
" {0x%x} 0x%x"
,
loc
.
Bytes
(),
val
.
Bytes
()
)
case
SSTORE
:
require
(
2
)
val
,
loc
:=
stack
.
Popn
()
//if val.Cmp(big.NewInt(0)) != 0 {
closure
.
SetStorage
(
loc
,
ethutil
.
NewValue
(
val
))
//}
// Add the change to manifest
vm
.
state
.
manifest
.
AddStorageChange
(
closure
.
Object
(),
loc
.
Bytes
(),
val
)
...
...
@@ -690,7 +688,7 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
fallthrough
case
STOP
:
// Stop the closure
vm
.
Printf
(
" (g) %v"
,
closure
.
Gas
)
.
Endl
()
vm
.
Endl
()
return
closure
.
Return
(
nil
),
nil
default
:
...
...
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