-
Notifications
You must be signed in to change notification settings - Fork 72
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(tracing/js): error not set in result_fn #222
Conversation
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
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.
ty,
one suggestion
src/tracing/js/mod.rs
Outdated
if let TransactTo::Call(target) = env.tx.transact_to { | ||
to = Some(target); | ||
} | ||
let r#type = match env.tx.transact_to { |
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.
oops, did we not set this properly?
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.
no, declare a tmp variable to make the ctx builder more compacted. And I see your point, I'll rollback the changes.
@@ -236,6 +236,7 @@ impl JsInspector { | |||
let gas_used = result.gas_used(); | |||
let mut to = 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.
lets remove this tmp var and do env.tx.transact_to.to().copied()
instead
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.
I don't think so, as txkind's to address will return None for the creation tx, so also need to extract from the creation's result
https://github.com/alloy-rs/core/blob/main/crates/primitives/src/common.rs#L47-L53
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.
ah I see
Signed-off-by: jsvisa <delweng@gmail.com>
@@ -236,6 +236,7 @@ impl JsInspector { | |||
let gas_used = result.gas_used(); | |||
let mut to = 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.
ah I see
We only set step's error, but missing the result's one.
use this tx to test it
for geth/erigon's response is:
currently reth's response is: