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

Commit 4dea6a2

Browse files
committed
PEP8 + import cleanup
1 parent 46dc700 commit 4dea6a2

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

ethereum/vm.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
verify_stack_after_op = False
44

55
# ######################################
6-
import sys
7-
8-
from ethereum import utils
9-
from ethereum.abi import is_numeric
106
import copy
7+
from ethereum import utils
118
from ethereum import opcodes
12-
import time
139
from ethereum.slogging import get_logger
1410
from rlp.utils import encode_hex, ascii_chr
1511
from ethereum.utils import to_string
@@ -108,12 +104,12 @@ def mem_extend(mem, compustate, op, start, sz):
108104
if sz:
109105
oldsize = len(mem) // 32
110106
old_totalfee = oldsize * opcodes.GMEMORY + \
111-
oldsize**2 // opcodes.GQUADRATICMEMDENOM
107+
oldsize ** 2 // opcodes.GQUADRATICMEMDENOM
112108
newsize = utils.ceil32(start + sz) // 32
113109
# if newsize > 524288:
114110
# raise Exception("Memory above 16 MB per call not supported by this VM")
115111
new_totalfee = newsize * opcodes.GMEMORY + \
116-
newsize**2 // opcodes.GQUADRATICMEMDENOM
112+
newsize ** 2 // opcodes.GQUADRATICMEMDENOM
117113
if old_totalfee < new_totalfee:
118114
memfee = new_totalfee - old_totalfee
119115
if compustate.gas < memfee:
@@ -173,14 +169,11 @@ def vm_execute(ext, msg, code):
173169

174170
codelen = len(processed_code)
175171

176-
s = time.time()
177172
op = None
178173
steps = 0
179174
_prevop = None # for trace only
180175

181176
while 1:
182-
# print('op: ', op, time.time() - s)
183-
# s = time.time()
184177
# stack size limit error
185178
if compustate.pc >= codelen:
186179
return peaceful_exit('CODE OUT OF RANGE', compustate.gas, [])

0 commit comments

Comments
 (0)