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
83cc08f6
Commit
83cc08f6
authored
Mar 12, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to big.Int.Not
parent
d11fabd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
vm.go
vm/vm.go
+7
-10
No files found.
vm/vm.go
View file @
83cc08f6
...
...
@@ -254,12 +254,10 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
stack
.
push
(
num
)
}
case
NOT
:
base
.
Sub
(
Pow256
,
stack
.
pop
())
.
Sub
(
base
,
ethutil
.
Big1
)
// Not needed
base
=
U256
(
base
)
stack
.
push
(
base
)
stack
.
push
(
U256
(
new
(
big
.
Int
)
.
Not
(
stack
.
pop
())))
//base.Sub(Pow256, stack.pop()).Sub(base, ethutil.Big1)
//base = U256(base)
//stack.push(base)
case
LT
:
x
,
y
:=
stack
.
pop
(),
stack
.
pop
()
self
.
Printf
(
" %v < %v"
,
x
,
y
)
...
...
@@ -349,16 +347,15 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
stack
.
push
(
base
)
case
ADDMOD
:
x
:=
stack
.
pop
()
y
:=
stack
.
pop
()
z
:=
stack
.
pop
()
add
:=
new
(
big
.
Int
)
.
Add
(
x
,
y
)
if
len
(
z
.
Bytes
())
>
0
{
// NOT 0x0
if
z
.
Cmp
(
Zero
)
>
0
{
add
:=
U256
(
new
(
big
.
Int
)
.
Add
(
x
,
y
))
base
.
Mod
(
add
,
z
)
U256
(
base
)
base
=
U256
(
base
)
}
self
.
Printf
(
" %v + %v %% %v = %v"
,
x
,
y
,
z
,
base
)
...
...
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