Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit 7e8b8f2

Browse files
committed
Enabled max_code_size test
1 parent c2d1025 commit 7e8b8f2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ethcore/src/ethereum/ethash.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@ impl Engine for Arc<Ethash> {
225225
} else if block_number < self.ethash_params.eip150_transition {
226226
Schedule::new_homestead()
227227
} else {
228+
let max_code_size = if block_number >= self.ethash_params.eip160_transition { self.ethash_params.max_code_size as usize } else { usize::max_value() };
228229
let mut schedule = Schedule::new_post_eip150(
229-
self.ethash_params.max_code_size as usize,
230+
max_code_size,
230231
block_number >= self.ethash_params.eip160_transition,
231232
block_number >= self.ethash_params.eip161abc_transition,
232233
block_number >= self.ethash_params.eip161d_transition);

ethcore/src/json_tests/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mod block_tests {
112112
declare_test!{BlockchainTests_GeneralStateTest_stCallDelegateCodesCallCodeHomestead, "BlockchainTests/GeneralStateTests/stCallDelegateCodesCallCodeHomestead/"}
113113
declare_test!{BlockchainTests_GeneralStateTest_stCallDelegateCodesHomestead, "BlockchainTests/GeneralStateTests/stCallDelegateCodesHomestead/"}
114114
declare_test!{BlockchainTests_GeneralStateTest_stChangedEIP150, "BlockchainTests/GeneralStateTests/stChangedEIP150/"}
115-
//declare_test!{BlockchainTests_GeneralStateTest_stCodeSizeLimit, "BlockchainTests/GeneralStateTests/stCodeSizeLimit/"}
115+
declare_test!{BlockchainTests_GeneralStateTest_stCodeSizeLimit, "BlockchainTests/GeneralStateTests/stCodeSizeLimit/"}
116116
declare_test!{BlockchainTests_GeneralStateTest_stCreateTest, "BlockchainTests/GeneralStateTests/stCreateTest/"}
117117
declare_test!{BlockchainTests_GeneralStateTest_stDelegatecallTestHomestead, "BlockchainTests/GeneralStateTests/stDelegatecallTestHomestead/"}
118118
declare_test!{BlockchainTests_GeneralStateTest_stEIP150singleCodeGasPrices, "BlockchainTests/GeneralStateTests/stEIP150singleCodeGasPrices/"}

ethcore/src/json_tests/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mod state_tests {
102102
declare_test!{GeneralStateTest_stCallDelegateCodesCallCodeHomestead, "GeneralStateTests/stCallDelegateCodesCallCodeHomestead/"}
103103
declare_test!{GeneralStateTest_stCallDelegateCodesHomestead, "GeneralStateTests/stCallDelegateCodesHomestead/"}
104104
declare_test!{GeneralStateTest_stChangedEIP150, "GeneralStateTests/stChangedEIP150/"}
105-
//declare_test!{GeneralStateTest_stCodeSizeLimit, "GeneralStateTests/stCodeSizeLimit/"}
105+
declare_test!{GeneralStateTest_stCodeSizeLimit, "GeneralStateTests/stCodeSizeLimit/"}
106106
declare_test!{GeneralStateTest_stCreateTest, "GeneralStateTests/stCreateTest/"}
107107
declare_test!{GeneralStateTest_stDelegatecallTestHomestead, "GeneralStateTests/stDelegatecallTestHomestead/"}
108108
declare_test!{GeneralStateTest_stEIP150singleCodeGasPrices, "GeneralStateTests/stEIP150singleCodeGasPrices/"}

0 commit comments

Comments
 (0)