Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit ae3f9fe

Browse files
committed
Remove max_call_gas indirection #415
Having the increased readability of the all_but_1_nth function is not worth the additional function call overhead.
1 parent bd06065 commit ae3f9fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ethereum/vm.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,10 @@ def eat_gas(compustate, amount):
140140
return True
141141

142142

143-
def all_but_1_nth(gas, n):
144-
return gas - (gas // n)
145-
146-
147143
def max_call_gas(gas):
148144
"""Since EIP150 CALLs will send only all but 1/64th of the available gas.
149145
"""
150-
return all_but_1_nth(gas, n=opcodes.CALL_CHILD_LIMIT_DENOM)
146+
return gas - (gas // opcodes.CALL_CHILD_LIMIT_DENOM)
151147

152148

153149
def vm_exception(error, **kargs):

0 commit comments

Comments
 (0)