File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def test_worst_storage_access_cold(
250
250
execution_code = Bytecode ()
251
251
252
252
if isinstance (storage_action , LoadAction ):
253
- execution_code = sum (Op .SLOAD (i ) for i in reversed (range (num_target_slots )))
253
+ execution_code + = sum (Op .SLOAD (i ) for i in reversed (range (num_target_slots )))
254
254
elif isinstance (storage_action , StoreAction ):
255
255
if storage_action == StoreAction .WRITE_SAME_VALUE :
256
256
# All the storage slots in the contract are initialized to their index.
@@ -268,7 +268,7 @@ def test_worst_storage_access_cold(
268
268
slots_init = (
269
269
Bytecode ()
270
270
if absent_slots
271
- else sum (Op .SSTORE (i , i ) for i in reversed (range (num_target_slots )))
271
+ else Bytecode () + sum (Op .SSTORE (i , i ) for i in reversed (range (num_target_slots )))
272
272
)
273
273
274
274
# To create the contract, we apply the slots_init code to initialize the storage slots
@@ -346,6 +346,7 @@ def test_worst_storage_access_warm(
346
346
347
347
calldata = Op .PUSH1 (storage_slot_initial_value )
348
348
execution_code = code_loop_precompile_call (calldata , execution_code_body , fork )
349
+ assert len (execution_code ) <= fork .max_code_size ()
349
350
350
351
execution_code_address = pre .deploy_contract (code = execution_code )
351
352
You can’t perform that action at this time.
0 commit comments