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
90b672f1
Commit
90b672f1
authored
May 21, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1062 from Gustav-Simonsson/tests_updates
Tests updates
parents
bf7dcfce
6a72cd45
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9209 additions
and
31 deletions
+9209
-31
execution.go
core/execution.go
+6
-0
block_test.go
tests/block_test.go
+4
-0
stCallCreateCallCodeTest.json
tests/files/StateTests/stCallCreateCallCodeTest.json
+434
-0
stMemoryStressTest.json
tests/files/StateTests/stMemoryStressTest.json
+10
-10
stRecursiveCreate.json
tests/files/StateTests/stRecursiveCreate.json
+8255
-0
stSolidityTest.json
tests/files/StateTests/stSolidityTest.json
+22
-14
vmArithmeticTest.json
tests/files/VMTests/vmArithmeticTest.json
+478
-7
No files found.
core/execution.go
View file @
90b672f1
...
...
@@ -38,6 +38,12 @@ func (self *Execution) Create(caller vm.ContextRef) (ret []byte, err error, acco
code
:=
self
.
input
self
.
input
=
nil
ret
,
err
=
self
.
exec
(
nil
,
code
,
caller
)
// Here we get an error if we run into maximum stack depth,
// See: https://github.com/ethereum/yellowpaper/pull/131
// and YP definitions for CREATE instruction
if
err
!=
nil
{
return
nil
,
err
,
nil
}
account
=
self
.
env
.
State
()
.
GetStateObject
(
*
self
.
address
)
return
}
...
...
tests/block_test.go
View file @
90b672f1
...
...
@@ -48,6 +48,10 @@ func TestBcTotalDifficulty(t *testing.T) {
runBlockTestsInFile
(
"files/BlockTests/bcTotalDifficultyTest.json"
,
[]
string
{},
t
)
}
func
TestBcWallet
(
t
*
testing
.
T
)
{
runBlockTestsInFile
(
"files/BlockTests/bcWalletTest.json"
,
[]
string
{},
t
)
}
func
runBlockTestsInFile
(
filepath
string
,
snafus
[]
string
,
t
*
testing
.
T
)
{
bt
,
err
:=
LoadBlockTests
(
filepath
)
if
err
!=
nil
{
...
...
tests/files/StateTests/stCallCreateCallCodeTest.json
View file @
90b672f1
This diff is collapsed.
Click to expand it.
tests/files/StateTests/stMemoryStressTest.json
View file @
90b672f1
...
...
@@ -266,35 +266,35 @@
},
"logs"
:
[
],
"out"
:
"
0x00
"
,
"out"
:
"
#4294967295
"
,
"post"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"0x0de0b6b3a7640000"
,
"code"
:
"0x6
40100000001
6000f3"
,
"code"
:
"0x6
3ffffffff
6000f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
},
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
:
{
"balance"
:
"0x2000180
85211
"
,
"balance"
:
"0x2000180
0520e
"
,
"code"
:
"0x"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
:
{
"balance"
:
"0x1869ec3b061
14f6f
"
,
"balance"
:
"0x1869ec3b061
94f72
"
,
"code"
:
"0x"
,
"nonce"
:
"0x01"
,
"storage"
:
{
}
}
},
"postStateRoot"
:
"
8745f6bdec4290420747b8c024382c6ed14e09f4a11718bdc1f0f99e4d04607b
"
,
"postStateRoot"
:
"
1716bcf6c106040a46ab1d37c569b7e0841f921b4d252dc5202fb05388308a39
"
,
"pre"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"0x0de0b6b3a7640000"
,
"code"
:
"0x6
40100000001
6000f3"
,
"code"
:
"0x6
3ffffffff
6000f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
...
...
@@ -328,11 +328,11 @@
},
"logs"
:
[
],
"out"
:
"
0x
"
,
"out"
:
"
#4294967295
"
,
"post"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"0x0de0b6b3a7640000"
,
"code"
:
"0x60016000526
40100000000
6000f3"
,
"code"
:
"0x60016000526
3ffffffff
6000f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
...
...
@@ -352,11 +352,11 @@
}
}
},
"postStateRoot"
:
"
e6c6c5b997cf7ecbc653c920a5b42d1ddd9f9ca2df2c68fd47059df2a3309b14
"
,
"postStateRoot"
:
"
b95676d3103fc4a6bdcfb1c201a6ed49e0fa7a239520a4b8ac034ce3b6c697eb
"
,
"pre"
:
{
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6"
:
{
"balance"
:
"0x0de0b6b3a7640000"
,
"code"
:
"0x60016000526
40100000000
6000f3"
,
"code"
:
"0x60016000526
3ffffffff
6000f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
...
...
tests/files/StateTests/stRecursiveCreate.json
View file @
90b672f1
This diff is collapsed.
Click to expand it.
tests/files/StateTests/stSolidityTest.json
View file @
90b672f1
...
...
@@ -268,42 +268,50 @@
},
"logs"
:
[
],
"out"
:
"0x000000000000000000000000000000000000000000000000000000000000000
0
"
,
"out"
:
"0x000000000000000000000000000000000000000000000000000000000000000
1
"
,
"post"
:
{
"0000000000000000000000000000000000000000"
:
{
"balance"
:
"0x00"
,
"code"
:
"0x"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
},
"095e7baea6a6c7c4c2dfeb977efac326af552d87"
:
{
"balance"
:
"0x0186a0"
,
"code"
:
"0x
6000357c0100000000000000000000000000000000000000000000000000000000900480633e0bca3b1461003a578063c04062261461004c57005b610042610099565b8060005260206000f35b61005461005e565b8060005260206000f35b6000610068610099565b600060006101000a81548160ff02191690830217905550600060009054906101000a900460ff169050610096565b90565b60006000600060019250825060018273ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f16100fd57005b505060005163ffffffff1614156101135761011c565b60009250610194565b60028173ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f161017457005b505060005163ffffffff16141561018a57610193565b60009250610194565b5b50509056
"
,
"nonce"
:
"0x0
0
"
,
"code"
:
"0x
7c010000000000000000000000000000000000000000000000000000000060003504633e0bca3b8114610039578063c0406226146100a857005b6100b55b600160008060456101ec8339604560006000f091508173ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f161011957005b6100bf60006100c961003d565b8060005260206000f35b8060005260206000f35b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016919091179081905560ff16919050565b505060005163ffffffff166002141561019d575b5b505090565b505060005163ffffffff1660011415610194575b60456101a7600039604560006000f090508073ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f16100ff57005b60009250610114565b600092506101145600603980600c6000396000f3007c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60026000818152602090f3603980600c6000396000f3007c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60016000818152602090f3
"
,
"nonce"
:
"0x0
2
"
,
"storage"
:
{
"0x00"
:
"0x01"
}
},
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
:
{
"balance"
:
"0x
ca69
"
,
"balance"
:
"0x
01f758
"
,
"code"
:
"0x"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b"
:
{
"balance"
:
"0x02f
a2617
"
,
"balance"
:
"0x02f
8f928
"
,
"code"
:
"0x"
,
"nonce"
:
"0x01"
,
"storage"
:
{
}
},
"b88de88b35ecbf3c141e3caae2baf35834d18f63"
:
{
"balance"
:
"0x00"
,
"code"
:
"0x7c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60026000818152602090f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
},
"d2571607e241ecf590ed94b12d87c94babe36db6"
:
{
"balance"
:
"0x00"
,
"code"
:
"0x7c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60016000818152602090f3"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
}
},
"postStateRoot"
:
"e
d06b00015d227623175bd12a5d960281781493ea1d9fed79d6c40a20e2c6ef7
"
,
"postStateRoot"
:
"e
7f84d674881d1cfd115be59e3e390271435c0b3474a482f7add54c3fe429d85
"
,
"pre"
:
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87"
:
{
"balance"
:
"0x0186a0"
,
"code"
:
"0x
6000357c0100000000000000000000000000000000000000000000000000000000900480633e0bca3b1461003a578063c04062261461004c57005b610042610099565b8060005260206000f35b61005461005e565b8060005260206000f35b6000610068610099565b600060006101000a81548160ff02191690830217905550600060009054906101000a900460ff169050610096565b90565b60006000600060019250825060018273ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f16100fd57005b505060005163ffffffff1614156101135761011c565b60009250610194565b60028173ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f161017457005b505060005163ffffffff16141561018a57610193565b60009250610194565b5b50509056
"
,
"code"
:
"0x
7c010000000000000000000000000000000000000000000000000000000060003504633e0bca3b8114610039578063c0406226146100a857005b6100b55b600160008060456101ec8339604560006000f091508173ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f161011957005b6100bf60006100c961003d565b8060005260206000f35b8060005260206000f35b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016919091179081905560ff16919050565b505060005163ffffffff166002141561019d575b5b505090565b505060005163ffffffff1660011415610194575b60456101a7600039604560006000f090508073ffffffffffffffffffffffffffffffffffffffff166381bda09b60206000827c010000000000000000000000000000000000000000000000000000000002600052600460006000866161da5a03f16100ff57005b60009250610114565b600092506101145600603980600c6000396000f3007c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60026000818152602090f3603980600c6000396000f3007c0100000000000000000000000000000000000000000000000000000000600035046381bda09b8114602d57005b60016000818152602090f3
"
,
"nonce"
:
"0x00"
,
"storage"
:
{
}
...
...
tests/files/VMTests/vmArithmeticTest.json
View file @
90b672f1
This diff is collapsed.
Click to expand it.
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