Skip to content

Commit 6b96e8a

Browse files
refactor(zkevm): update linting issue
1 parent de6a6e4 commit 6b96e8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/zkevm/test_worst_stateful_opcodes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_worst_storage_access_cold(
250250
execution_code = Bytecode()
251251

252252
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)))
254254
elif isinstance(storage_action, StoreAction):
255255
if storage_action == StoreAction.WRITE_SAME_VALUE:
256256
# All the storage slots in the contract are initialized to their index.
@@ -268,7 +268,7 @@ def test_worst_storage_access_cold(
268268
slots_init = (
269269
Bytecode()
270270
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)))
272272
)
273273

274274
# 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(
346346

347347
calldata = Op.PUSH1(storage_slot_initial_value)
348348
execution_code = code_loop_precompile_call(calldata, execution_code_body, fork)
349+
assert len(execution_code) <= fork.max_code_size()
349350

350351
execution_code_address = pre.deploy_contract(code=execution_code)
351352

0 commit comments

Comments
 (0)