Skip to content

Commit 980342e

Browse files
refactor(zkevm): update test parameters for log opcodes
1 parent 53e7ec3 commit 980342e

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tests/zkevm/test_worst_compute.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,34 +2273,25 @@ def test_worst_push(
22732273
"size",
22742274
[
22752275
0, # 0 bytes
2276-
10, # 10 bytes
2277-
100, # 100 bytes
2278-
1 * 1024, # 1KiB
2279-
10 * 1024, # 10KiB
2280-
100 * 1024, # 100KiB
22812276
1024 * 1024, # 1MiB
22822277
],
22832278
)
2284-
@pytest.mark.parametrize("empty_value", [True, False])
2279+
@pytest.mark.parametrize("empty_topic", [True, False])
22852280
@pytest.mark.parametrize("fixed_offset", [True, False])
22862281
def test_worst_log_opcodes(
22872282
state_test: StateTestFiller,
22882283
pre: Alloc,
22892284
fork: Fork,
22902285
opcode: Opcode,
2291-
empty_value: bool,
2286+
empty_topic: bool,
22922287
size: int,
22932288
fixed_offset: bool,
22942289
):
22952290
"""Test running a block with as many LOG opcodes as possible."""
22962291
env = Environment()
22972292
max_code_size = fork.max_code_size()
22982293

2299-
calldata = (
2300-
Op.PUSH0
2301-
if empty_value
2302-
else Op.PUSH32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
2303-
)
2294+
calldata = Op.PUSH0 if empty_topic else Op.PUSH32(2**256 - 1)
23042295

23052296
topic_count = len(opcode.kwargs or []) - 2
23062297

0 commit comments

Comments
 (0)