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
a9068aa8
Commit
a9068aa8
authored
Dec 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into poc8
parents
51a97c03
89244981
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
50 deletions
+9
-50
main.go
cmd/ethtest/main.go
+8
-3
randomTest.json
tests/files/VMTests/RandomTests/randomTest.json
+0
-46
vm_debug.go
vm/vm_debug.go
+1
-1
No files found.
cmd/ethtest/main.go
View file @
a9068aa8
...
...
@@ -95,10 +95,15 @@ func RunVmTest(js string) (failed int) {
failed
=
1
}
gexp
:=
ethutil
.
Big
(
test
.
Gas
)
if
gexp
.
Cmp
(
gas
)
!=
0
{
log
.
Printf
(
"%s's gas failed. Expected %v, got %v
\n
"
,
name
,
gexp
,
gas
)
if
len
(
test
.
Gas
)
==
0
&&
err
==
nil
{
log
.
Printf
(
"0 gas indicates error but no error given by VM"
)
failed
=
1
}
else
{
gexp
:=
ethutil
.
Big
(
test
.
Gas
)
if
gexp
.
Cmp
(
gas
)
!=
0
{
log
.
Printf
(
"%s's gas failed. Expected %v, got %v
\n
"
,
name
,
gexp
,
gas
)
failed
=
1
}
}
for
addr
,
account
:=
range
test
.
Post
{
...
...
tests/files/VMTests/RandomTests/randomTest.json
deleted
100644 → 0
View file @
51a97c03
{
"randomVMtest"
:
{
"callcreates"
:
[
],
"env"
:
{
"currentCoinbase"
:
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
,
"currentDifficulty"
:
"256"
,
"currentGasLimit"
:
"1000000"
,
"currentNumber"
:
"0"
,
"currentTimestamp"
:
"1"
,
"previousHash"
:
"5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec"
:
{
"address"
:
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
,
"caller"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"code"
:
"0x675545"
,
"data"
:
"0x"
,
"gas"
:
"10000"
,
"gasPrice"
:
"100000000000000"
,
"origin"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"value"
:
"1000000000000000000"
},
"gas"
:
"9999"
,
"logs"
:
[
],
"out"
:
"0x"
,
"post"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"1000000000000000000"
,
"code"
:
"0x675545"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
},
"pre"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"1000000000000000000"
,
"code"
:
"0x675545"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
}
}
}
\ No newline at end of file
vm/vm_debug.go
View file @
a9068aa8
...
...
@@ -140,7 +140,7 @@ func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price *
// Stack checks only
case
ISZERO
,
CALLDATALOAD
,
POP
,
JUMP
,
NOT
:
// 1
require
(
1
)
case
ADD
,
SUB
,
DIV
,
SDIV
,
MOD
,
SMOD
,
LT
,
GT
,
SLT
,
SGT
,
EQ
,
AND
,
OR
,
XOR
,
BYTE
:
// 2
case
ADD
,
SUB
,
DIV
,
SDIV
,
MOD
,
SMOD
,
LT
,
GT
,
SLT
,
SGT
,
EQ
,
AND
,
OR
,
XOR
,
BYTE
,
SIGNEXTEND
:
// 2
require
(
2
)
case
ADDMOD
,
MULMOD
:
// 3
require
(
3
)
...
...
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