-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix[test] integration tests #213
fix[test] integration tests #213
Conversation
745cf77
to
18ab5b6
Compare
boa/contracts/base_evm_contract.py
Outdated
@@ -45,6 +45,12 @@ class StackTrace(list): | |||
def __str__(self): | |||
return "\n\n".join(str(x) for x in self) | |||
|
|||
@property | |||
def dev_reason(self) -> str | None: | |||
if isinstance(self.last_frame, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, when can this happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few lines later:
[f"<Unknown location in unknown contract {computation.msg.code_address.hex()}>"] |
boa/contracts/base_evm_contract.py
Outdated
@@ -76,9 +82,9 @@ def _handle_child_trace(computation, env, return_trace): | |||
else: | |||
child_trace = child_obj.stack_trace(child) | |||
|
|||
if child_trace.last_frame.dev_reason and not return_trace.last_frame.dev_reason: | |||
if child_trace.dev_reason and not return_trace.dev_reason: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change looks spooky. maybe we should check if last_frame is not None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should still test for is not None
, as you could have an empty dev reason (which is valid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the return value of dev_reason
could still be an empty string!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #202
Tested in https://github.com/DanielSchiavini/titanoboa/actions/runs/9029296510/job/24811369660?pr=7 via DanielSchiavini#7
Cute Animal Picture