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
3f03197d
Commit
3f03197d
authored
Feb 04, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests
parent
4dc283c0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
137 additions
and
5 deletions
+137
-5
badBlockChain.json
tests/files/BlockchainTests/badBlockChain.json
+0
-0
basicBlockChain.json
tests/files/BlockchainTests/basicBlockChain.json
+0
-0
stRefundTest.json
tests/files/StateTests/stRefundTest.json
+40
-0
201502031248CPPJIT.json
tests/files/VMTests/RandomTests/201502031248CPPJIT.json
+31
-0
201502032117GO.json
tests/files/VMTests/RandomTests/201502032117GO.json
+59
-0
index.js
tests/files/index.js
+2
-2
package.json
tests/files/package.json
+1
-1
vm.go
vm/vm.go
+4
-2
No files found.
tests/files/BlockTests/badBlockChain.json
→
tests/files/Block
chain
Tests/badBlockChain.json
View file @
3f03197d
File moved
tests/files/BlockTests/basicBlockChain.json
→
tests/files/Block
chain
Tests/basicBlockChain.json
View file @
3f03197d
File moved
tests/files/StateTests/stRefundTest.json
View file @
3f03197d
{
"RefundOverflow"
:
{
"env"
:
{
"currentCoinbase"
:
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
,
"currentDifficulty"
:
"45678256"
,
"currentGasLimit"
:
"115792089237316195423570985008687907853269984665640564039457584007913129639935"
,
"currentNumber"
:
"0"
,
"currentTimestamp"
:
1
,
"previousHash"
:
"5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"logs"
:
[
],
"out"
:
"0x"
,
"post"
:
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
:
{
"balance"
:
"400"
,
"code"
:
"0x"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
},
"pre"
:
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
:
{
"balance"
:
"400"
,
"code"
:
"0x"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
},
"transaction"
:
{
"data"
:
""
,
"gasLimit"
:
"5789604461865809771178549250434395392663499233282028201972879200395656482016"
,
"gasPrice"
:
"20"
,
"nonce"
:
"0"
,
"secretKey"
:
"45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8"
,
"to"
:
"b94f5374fce5edbc8e2a8697c15331677e6ebf0b"
,
"value"
:
""
}
},
"refund500"
:
{
"env"
:
{
"currentCoinbase"
:
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
,
...
...
tests/files/VMTests/RandomTests/201502031248CPPJIT.json
0 → 100644
View file @
3f03197d
{
"randomVMtest"
:
{
"env"
:
{
"currentCoinbase"
:
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
,
"currentDifficulty"
:
"115792089237316195423570985008687907853269984665640564039457584007913129639935"
,
"currentGasLimit"
:
"1000000"
,
"currentNumber"
:
"300"
,
"currentTimestamp"
:
"2"
,
"previousHash"
:
"5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec"
:
{
"address"
:
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
,
"caller"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"code"
:
"0x404544420855"
,
"data"
:
"0x"
,
"gas"
:
"10000"
,
"gasPrice"
:
"100000000000000"
,
"origin"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"value"
:
"1000000000000000000"
},
"pre"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"1000000000000000000"
,
"code"
:
"0x404544420855"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
}
}
}
tests/files/VMTests/RandomTests/201502032117GO.json
0 → 100644
View file @
3f03197d
{
"randomVMtest"
:
{
"callcreates"
:
[
{
"data"
:
"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
,
"destination"
:
""
,
"gasLimit"
:
"9872"
,
"value"
:
"2"
},
{
"data"
:
"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
,
"destination"
:
""
,
"gasLimit"
:
"9770"
,
"value"
:
"9870"
}
],
"env"
:
{
"currentCoinbase"
:
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
,
"currentDifficulty"
:
"115792089237316195423570985008687907853269984665640564039457584007913129639935"
,
"currentGasLimit"
:
"1000000"
,
"currentNumber"
:
"300"
,
"currentTimestamp"
:
"2"
,
"previousHash"
:
"5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec"
:
{
"address"
:
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
,
"caller"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"code"
:
"0x424443444243434383f0155af055"
,
"data"
:
"0x"
,
"gas"
:
"10000"
,
"gasPrice"
:
"100000000000000"
,
"origin"
:
"cd1722f3947def4cf144679da39c4c32bdc35681"
,
"value"
:
"1000000000000000000"
},
"gas"
:
"9470"
,
"logs"
:
[
],
"out"
:
"0x"
,
"post"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"999999999999990128"
,
"code"
:
"0x424443444243434383f0155af055"
,
"nonce"
:
"0"
,
"storage"
:
{
"0x945304eb96065b2a98b57a48a06ae28d285a71b5"
:
"0x02"
}
}
},
"pre"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"1000000000000000000"
,
"code"
:
"0x424443444243434383f0155af055"
,
"nonce"
:
"0"
,
"storage"
:
{
}
}
}
}
}
tests/files/index.js
View file @
3f03197d
var
tests
=
module
.
exports
=
{};
Object
.
defineProperties
(
tests
,
{
blockTests
:
{
get
:
require
(
'require-all'
).
bind
(
this
,
__dirname
+
'/BlockTests'
)
block
chain
Tests
:
{
get
:
require
(
'require-all'
).
bind
(
this
,
__dirname
+
'/Block
chain
Tests'
)
},
basicTests
:
{
get
:
require
(
'require-all'
).
bind
(
this
,
__dirname
+
'/BasicTests/'
)
...
...
tests/files/package.json
View file @
3f03197d
{
"name"
:
"ethereum-tests"
,
"version"
:
"0.0.
2
"
,
"version"
:
"0.0.
3
"
,
"description"
:
"tests for ethereum"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
vm/vm.go
View file @
3f03197d
...
...
@@ -510,7 +510,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
case
GASPRICE
:
stack
.
Push
(
context
.
Price
)
self
.
Printf
(
" => %
v
"
,
context
.
Price
)
self
.
Printf
(
" => %
x
"
,
context
.
Price
)
// 0x40 range
case
BLOCKHASH
:
...
...
@@ -643,6 +643,8 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
stack
.
Push
(
big
.
NewInt
(
int64
(
mem
.
Len
())))
case
GAS
:
stack
.
Push
(
context
.
Gas
)
self
.
Printf
(
" => %x"
,
context
.
Gas
)
// 0x60 range
case
CREATE
:
...
...
@@ -653,6 +655,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
gas
=
new
(
big
.
Int
)
.
Set
(
context
.
Gas
)
addr
[]
byte
)
self
.
Endl
()
context
.
UseGas
(
context
.
Gas
)
ret
,
suberr
,
ref
:=
self
.
env
.
Create
(
context
,
nil
,
input
,
gas
,
price
,
value
)
...
...
@@ -673,7 +676,6 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
stack
.
Push
(
ethutil
.
BigD
(
addr
))
self
.
Printf
(
" (*) %x"
,
addr
)
}
// Debug hook
...
...
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