@@ -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 ))
@@ -619,6 +620,7 @@ def test_worst_selfdestruct_created(
619
620
the same transaction.
620
621
"""
621
622
env = Environment ()
623
+ pre .fund_address (env .fee_recipient , 1 )
622
624
623
625
# SELFDESTRUCT(COINBASE) contract deployment
624
626
# code = Op.MSTORE8(0, 0x41) + Op.MSTORE8(1, 0xFF) + Op.RETURN(0, 2)
@@ -638,12 +640,12 @@ def test_worst_selfdestruct_created(
638
640
),
639
641
# Stop before we run out of gas for the whole tx execution.
640
642
# 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 ),
642
644
)
643
645
+ Op .SSTORE (0 , 42 ) # Done for successful tx execution assertion below.
644
646
)
645
647
# 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 })
647
649
code_tx = Transaction (
648
650
to = code_addr ,
649
651
gas_limit = env .gas_limit ,
0 commit comments