Skip to content

Commit 03473d4

Browse files
committed
Merge pull request #875 from Gustav-Simonsson/test_updates
Test updates
2 parents 45c070f + 79eb40f commit 03473d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9983
-4920
lines changed

tests/block_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ func TestBcForkBlockTests(t *testing.T) {
4444
runBlockTestsInFile("files/BlockTests/bcForkBlockTest.json", []string{}, t)
4545
}
4646

47+
func TestBcTotalDifficulty(t *testing.T) {
48+
runBlockTestsInFile("files/BlockTests/bcTotalDifficultyTest.json", []string{}, t)
49+
}
50+
4751
func runBlockTestsInFile(filepath string, snafus []string, t *testing.T) {
4852
bt, err := LoadBlockTests(filepath)
4953
if err != nil {

tests/files/BlockTests/bcTotalDifficultyTest.json

Lines changed: 3240 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"randomStatetest" : {
3+
"env" : {
4+
"currentCoinbase" : "945304eb96065b2a98b57a48a06ae28d285a71b5",
5+
"currentDifficulty" : "0x051d6a3cd647",
6+
"currentGasLimit" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
7+
"currentNumber" : "0x00",
8+
"currentTimestamp" : "0x01",
9+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
10+
},
11+
"logs" : [
12+
],
13+
"out" : "0x",
14+
"post" : {
15+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
16+
"balance" : "0x00",
17+
"code" : "0x7f0000000000000000000000010000000000000000000000000000000000000000a27f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff167ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff42070b8c5430070bf15560005155",
18+
"nonce" : "0x00",
19+
"storage" : {
20+
}
21+
},
22+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
23+
"balance" : "0x2e4c7aa9",
24+
"code" : "0x6000355415600957005b60203560003555",
25+
"nonce" : "0x00",
26+
"storage" : {
27+
}
28+
},
29+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
30+
"balance" : "0x0de0b6b379178585",
31+
"code" : "0x",
32+
"nonce" : "0x01",
33+
"storage" : {
34+
}
35+
}
36+
},
37+
"postStateRoot" : "6cfc27db102eef174dcf122d8f31a69f009fb0d349fafc44f01c46c5475a92f5",
38+
"pre" : {
39+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
40+
"balance" : "0x00",
41+
"code" : "0x7f0000000000000000000000010000000000000000000000000000000000000000a27f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff167ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff42070b8c5430070bf15560005155",
42+
"nonce" : "0x00",
43+
"storage" : {
44+
}
45+
},
46+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
47+
"balance" : "0x2e",
48+
"code" : "0x6000355415600957005b60203560003555",
49+
"nonce" : "0x00",
50+
"storage" : {
51+
}
52+
},
53+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
54+
"balance" : "0x0de0b6b3a7640000",
55+
"code" : "0x",
56+
"nonce" : "0x00",
57+
"storage" : {
58+
}
59+
}
60+
},
61+
"transaction" : {
62+
"data" : "0x7f0000000000000000000000010000000000000000000000000000000000000000a27f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff167ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000100000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff42070b8c5430070bf1",
63+
"gasLimit" : "0x2e4c7a7b",
64+
"gasPrice" : "0x01",
65+
"nonce" : "0x00",
66+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
67+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
68+
"value" : "0x293d448f"
69+
}
70+
}
71+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"randomStatetest" : {
3+
"env" : {
4+
"currentCoinbase" : "945304eb96065b2a98b57a48a06ae28d285a71b5",
5+
"currentDifficulty" : "0x051d6a3cd647",
6+
"currentGasLimit" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
7+
"currentNumber" : "0x00",
8+
"currentTimestamp" : "0x01",
9+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
10+
},
11+
"logs" : [
12+
],
13+
"out" : "0x",
14+
"post" : {
15+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
16+
"balance" : "0x33c6014b",
17+
"code" : "0x7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60005155",
18+
"nonce" : "0x00",
19+
"storage" : {
20+
"0x00" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
21+
}
22+
},
23+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
24+
"balance" : "0xc396",
25+
"code" : "0x6000355415600957005b60203560003555",
26+
"nonce" : "0x00",
27+
"storage" : {
28+
}
29+
},
30+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
31+
"balance" : "0x0de0b6b3739d3b4d",
32+
"code" : "0x",
33+
"nonce" : "0x01",
34+
"storage" : {
35+
}
36+
}
37+
},
38+
"postStateRoot" : "f1f5f06ca3269f5e4e7d172828216e2089156370c90bf41ec84bdc04de644a6f",
39+
"pre" : {
40+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
41+
"balance" : "0x00",
42+
"code" : "0x7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60005155",
43+
"nonce" : "0x00",
44+
"storage" : {
45+
}
46+
},
47+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
48+
"balance" : "0x2e",
49+
"code" : "0x6000355415600957005b60203560003555",
50+
"nonce" : "0x00",
51+
"storage" : {
52+
}
53+
},
54+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
55+
"balance" : "0x0de0b6b3a7640000",
56+
"code" : "0x",
57+
"nonce" : "0x00",
58+
"storage" : {
59+
}
60+
}
61+
},
62+
"transaction" : {
63+
"data" : "0x7f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f00000000000000000000000000000000000000000000000000000000000000007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe447f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b57f00000000000000000000000000000000000000000000000000000000000000017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe",
64+
"gasLimit" : "0x0cc5000c",
65+
"gasPrice" : "0x01",
66+
"nonce" : "0x00",
67+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
68+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
69+
"value" : "0x33c6014b"
70+
}
71+
}
72+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"randomStatetest" : {
3+
"env" : {
4+
"currentCoinbase" : "945304eb96065b2a98b57a48a06ae28d285a71b5",
5+
"currentDifficulty" : "0x051d6a3cd647",
6+
"currentGasLimit" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
7+
"currentNumber" : "0x00",
8+
"currentTimestamp" : "0x01",
9+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
10+
},
11+
"logs" : [
12+
],
13+
"out" : "0x",
14+
"post" : {
15+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
16+
"balance" : "0x3f7ada4a",
17+
"code" : "0x7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000015560005155",
18+
"nonce" : "0x00",
19+
"storage" : {
20+
"0x00" : "0xffffffffffffffffffffffffffffffffffffffff",
21+
"0x01" : "0x01"
22+
}
23+
},
24+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
25+
"balance" : "0x0102f7",
26+
"code" : "0x6000355415600957005b60203560003555",
27+
"nonce" : "0x00",
28+
"storage" : {
29+
}
30+
},
31+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
32+
"balance" : "0x0de0b6b367e822ed",
33+
"code" : "0x",
34+
"nonce" : "0x01",
35+
"storage" : {
36+
}
37+
}
38+
},
39+
"postStateRoot" : "2ac7a32edf453f27c5910d2e018b0b8825e1d849ba2bfa68fffb6899e9f57cb0",
40+
"pre" : {
41+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
42+
"balance" : "0x00",
43+
"code" : "0x7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000015560005155",
44+
"nonce" : "0x00",
45+
"storage" : {
46+
}
47+
},
48+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
49+
"balance" : "0x2e",
50+
"code" : "0x6000355415600957005b60203560003555",
51+
"nonce" : "0x00",
52+
"storage" : {
53+
}
54+
},
55+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
56+
"balance" : "0x0de0b6b3a7640000",
57+
"code" : "0x",
58+
"nonce" : "0x00",
59+
"storage" : {
60+
}
61+
}
62+
},
63+
"transaction" : {
64+
"data" : "0x7f00000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000100000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000c3507f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000000000000000000000000000000000000000000001",
65+
"gasLimit" : "0x1b7d47a1",
66+
"gasPrice" : "0x01",
67+
"nonce" : "0x00",
68+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
69+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
70+
"value" : "0x3f7ada4a"
71+
}
72+
}
73+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"randomStatetest" : {
3+
"env" : {
4+
"currentCoinbase" : "945304eb96065b2a98b57a48a06ae28d285a71b5",
5+
"currentDifficulty" : "0x051d6a3cd647",
6+
"currentGasLimit" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
7+
"currentNumber" : "0x00",
8+
"currentTimestamp" : "0x01",
9+
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
10+
},
11+
"logs" : [
12+
],
13+
"out" : "0x",
14+
"post" : {
15+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
16+
"balance" : "0x4e91b038",
17+
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000010000000000000000000000000000000000000000947f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b560005155",
18+
"nonce" : "0x00",
19+
"storage" : {
20+
"0x00" : "0x945304eb96065b2a98b57a48a06ae28d285a71b5"
21+
}
22+
},
23+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
24+
"balance" : "0xc097",
25+
"code" : "0x6000355415600957005b60203560003555",
26+
"nonce" : "0x00",
27+
"storage" : {
28+
}
29+
},
30+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
31+
"balance" : "0x0de0b6b358d18f5f",
32+
"code" : "0x",
33+
"nonce" : "0x01",
34+
"storage" : {
35+
}
36+
}
37+
},
38+
"postStateRoot" : "df7a2395377733685e4ffd910ac50c5e14adceb1d0648200e6a35451f7ffe707",
39+
"pre" : {
40+
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
41+
"balance" : "0x00",
42+
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000010000000000000000000000000000000000000000947f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b560005155",
43+
"nonce" : "0x00",
44+
"storage" : {
45+
}
46+
},
47+
"945304eb96065b2a98b57a48a06ae28d285a71b5" : {
48+
"balance" : "0x2e",
49+
"code" : "0x6000355415600957005b60203560003555",
50+
"nonce" : "0x00",
51+
"storage" : {
52+
}
53+
},
54+
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
55+
"balance" : "0x0de0b6b3a7640000",
56+
"code" : "0x",
57+
"nonce" : "0x00",
58+
"storage" : {
59+
}
60+
}
61+
},
62+
"transaction" : {
63+
"data" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000017f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000ffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7f0000000000000000000000010000000000000000000000000000000000000000947f000000000000000000000000945304eb96065b2a98b57a48a06ae28d285a71b5",
64+
"gasLimit" : "0x3e7f5362",
65+
"gasPrice" : "0x01",
66+
"nonce" : "0x00",
67+
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
68+
"to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87",
69+
"value" : "0x4e91b038"
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)