Skip to content

Commit d2328f3

Browse files
committed
fix
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent afc7f13 commit d2328f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/zkevm/test_worst_bytecode.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
MAX_CONTRACT_SIZE = 24 * 1024
1818
GAS_LIMIT = 36_000_000
19-
MAX_NUM_CONTRACT_CALLS = (GAS_LIMIT - 21_000) // (3 + 2600)
19+
MAX_NUM_CONTRACT_CALLS = (GAS_LIMIT - 21_000) // (3 + 2600 + 2)
2020

2121

2222
@pytest.mark.zkevm
@@ -43,7 +43,9 @@ def test_worst_bytecode(
4343
code = Op.JUMPDEST * (MAX_CONTRACT_SIZE - 1 - 10) + Op.PUSH10(i)
4444
contract_addrs.append(pre.deploy_contract(code=code))
4545

46-
attack_code = sum([Op.EXTCODESIZE(contract_addrs[i]) for i in range(num_called_contracts)])
46+
attack_code = sum(
47+
[(Op.EXTCODESIZE(contract_addrs[i]) + Op.POP) for i in range(num_called_contracts)]
48+
)
4749
attack_contract = pre.deploy_contract(code=attack_code)
4850

4951
tx = Transaction(

0 commit comments

Comments
 (0)