Skip to content

Commit 505760b

Browse files
committed
Use self._length_cache instead of len() call.
1 parent 993bc85 commit 505760b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/vm/code_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def seek(self, pc: int) -> Iterator['CodeStream']:
7777
invalid_positions = None
7878

7979
def is_valid_opcode(self, position: int) -> bool:
80-
if position >= len(self):
80+
if position >= self._length_cache:
8181
return False
8282
if position in self.invalid_positions:
8383
return False

0 commit comments

Comments
 (0)