Skip to content

Commit d4ed12c

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/zkevm/test_worst_stateful_opcodes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def test_worst_selfdestruct_existing(
492492
"""Test running a block with as many SELFDESTRUCTs as possible for existing contracts."""
493493
env = Environment(gas_limit=100_000_000_000)
494494
attack_gas_limit = Environment().gas_limit
495+
pre.fund_address(env.fee_recipient, 1)
495496

496497
# Template code that will be used to deploy a large number of contracts.
497498
selfdestructable_contract_addr = pre.deploy_contract(code=Op.SELFDESTRUCT(Op.COINBASE))
@@ -619,6 +620,7 @@ def test_worst_selfdestruct_created(
619620
the same transaction.
620621
"""
621622
env = Environment()
623+
pre.fund_address(env.fee_recipient, 1)
622624

623625
# SELFDESTRUCT(COINBASE) contract deployment
624626
# code = Op.MSTORE8(0, 0x41) + Op.MSTORE8(1, 0xFF) + Op.RETURN(0, 2)
@@ -638,12 +640,12 @@ def test_worst_selfdestruct_created(
638640
),
639641
# Stop before we run out of gas for the whole tx execution.
640642
# The value was found by trial-error rounded to the next 1000 multiple.
641-
condition=Op.GT(Op.GAS, 25_000),
643+
condition=Op.GT(Op.GAS, 10_000),
642644
)
643645
+ Op.SSTORE(0, 42) # Done for successful tx execution assertion below.
644646
)
645647
# The 0 storage slot is initialize to avoid creation costs in SSTORE above.
646-
code_addr = pre.deploy_contract(code=code, storage={0: 1})
648+
code_addr = pre.deploy_contract(code=code, balance=100_000, storage={0: 1})
647649
code_tx = Transaction(
648650
to=code_addr,
649651
gas_limit=env.gas_limit,

0 commit comments

Comments
 (0)