You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pc should be changed to program_counter in the __slots__ of CodeStream class. Although it does not raise errors (since program_counter is inherited from CodeStreamAPI), I think should correct it.
classCodeStream(CodeStreamAPI):
__slots__= [
"_length_cache",
"_raw_code_bytes",
"invalid_positions",
"valid_positions",
"pc",
]
logger=logging.getLogger("eth.vm.CodeStream")
def__init__(self, code_bytes: bytes) ->None:
validate_is_bytes(code_bytes, title="CodeStream bytes")
# in order to avoid method overhead when setting/accessing pc, we no longer# fence the pc (Program Counter) into 0 <= pc <= len(code_bytes).# We now let it float free.# NOTE: Setting pc to a negative value has undefined behavior.self.program_counter=0self._raw_code_bytes=code_bytesself._length_cache=len(code_bytes)
self.invalid_positions: Set[int] =set()
self.valid_positions: Set[int] =set()
pc
should be changed toprogram_counter
in the__slots__
of CodeStream class. Although it does not raise errors (sinceprogram_counter
is inherited fromCodeStreamAPI
), I think should correct it.https://github.com/ethereum/py-evm/blob/8aa9eb51944b4dcf6b365eb032ac674fed933c09/eth/vm/code_stream.py#LL21C1-L42C47
The text was updated successfully, but these errors were encountered: