@@ -142,9 +142,8 @@ void run_blockchain_tests(std::span<const BlockchainTest> tests, evmc::VM& vm)
142
142
std::unordered_map<int64_t , hash256> known_block_hashes{
143
143
{c.genesis_block_header .block_number , c.genesis_block_header .hash }};
144
144
145
- for (size_t i = 0 ; i != c.test_blocks . size (); ++i )
145
+ for (const auto & test_block : c.test_blocks )
146
146
{
147
- const auto & test_block = c.test_blocks [i];
148
147
auto bi = test_block.block_info ;
149
148
bi.known_block_hashes = known_block_hashes;
150
149
@@ -159,16 +158,8 @@ void run_blockchain_tests(std::span<const BlockchainTest> tests, evmc::VM& vm)
159
158
SCOPED_TRACE (std::string{evmc::to_string (rev)} + ' /' + std::to_string (case_index) +
160
159
' /' + c.name + ' /' + std::to_string (test_block.block_info .number ));
161
160
162
- if (i < 5 || i >= c.test_blocks .size () - 5 )
163
- {
164
- // Only check state hashes for first (early problems)
165
- // and last (final check of all blocks) 5 blocks.
166
- // Otherwise, for very long blockchain test we spend a lot of time in MPT hashing
167
- // because the implementation of it is very simplistic: the trie is not updated
168
- // along the state changes but a new trie is build from scratch for every block.
169
- EXPECT_EQ (
170
- state::mpt_hash (TestState{state}), test_block.expected_block_header .state_root );
171
- }
161
+ EXPECT_EQ (
162
+ state::mpt_hash (TestState{state}), test_block.expected_block_header .state_root );
172
163
173
164
if (rev >= EVMC_SHANGHAI)
174
165
{
0 commit comments