@@ -492,6 +492,7 @@ def test_worst_selfdestruct_existing(
492
492
"""Test running a block with as many SELFDESTRUCTs as possible for existing contracts."""
493
493
env = Environment (gas_limit = 100_000_000_000 )
494
494
attack_gas_limit = Environment ().gas_limit
495
+ pre .fund_address (env .fee_recipient , 1 )
495
496
496
497
# Template code that will be used to deploy a large number of contracts.
497
498
selfdestructable_contract_addr = pre .deploy_contract (code = Op .SELFDESTRUCT (Op .COINBASE ))
@@ -621,6 +622,7 @@ def test_worst_selfdestruct_created(
621
622
the same transaction.
622
623
"""
623
624
env = Environment ()
625
+ pre .fund_address (env .fee_recipient , 1 )
624
626
625
627
# SELFDESTRUCT(COINBASE) contract deployment
626
628
# code = Op.MSTORE8(0, 0x41) + Op.MSTORE8(1, 0xFF) + Op.RETURN(0, 2)
@@ -640,12 +642,12 @@ def test_worst_selfdestruct_created(
640
642
),
641
643
# Stop before we run out of gas for the whole tx execution.
642
644
# The value was found by trial-error rounded to the next 1000 multiple.
643
- condition = Op .GT (Op .GAS , 25_000 ),
645
+ condition = Op .GT (Op .GAS , 10_000 ),
644
646
)
645
647
+ Op .SSTORE (0 , 42 ) # Done for successful tx execution assertion below.
646
648
)
647
649
# The 0 storage slot is initialize to avoid creation costs in SSTORE above.
648
- code_addr = pre .deploy_contract (code = code , storage = {0 : 1 })
650
+ code_addr = pre .deploy_contract (code = code , balance = 100_000 , storage = {0 : 1 })
649
651
code_tx = Transaction (
650
652
to = code_addr ,
651
653
gas_limit = env .gas_limit ,
0 commit comments