Skip to content

Commit 634eb75

Browse files
Fix tiny error in test_call_and_callcode_gas_calculation.
1 parent e91aba1 commit 634eb75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/frontier/opcodes/test_call_and_callcode_gas_calculation.py

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

6464

6565
@pytest.fixture
66-
def callee_code(callee_opcode: Op) -> Bytecode:
66+
def callee_code(pre: Alloc, callee_opcode: Op) -> Bytecode:
6767
"""
6868
Code called by the caller contract:
6969
PUSH1 0x00 * 4
@@ -72,7 +72,9 @@ def callee_code(callee_opcode: Op) -> Bytecode:
7272
GAS <- value doesn't matter
7373
CALL/CALLCODE.
7474
"""
75-
return callee_opcode(Op.GAS(), 0xFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, 1, 0, 0, 0, 0)
75+
# The address needs to be empty and different for each execution of the fixture,
76+
# otherwise the calculations (empty_account_cost) are incorrect.
77+
return callee_opcode(Op.GAS(), pre.empty_account(), 1, 0, 0, 0, 0)
7678

7779

7880
@pytest.fixture

0 commit comments

Comments
 (0)