Skip to content
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

Use ExitReason::Revert instead of ExitReason::Error #1767

Closed
zjb0807 opened this issue Jan 11, 2022 · 0 comments · Fixed by #1772
Closed

Use ExitReason::Revert instead of ExitReason::Error #1767

zjb0807 opened this issue Jan 11, 2022 · 0 comments · Fixed by #1772

Comments

@zjb0807
Copy link
Member

zjb0807 commented Jan 11, 2022

EVM does not return the error message when using ExitReason::Error
https://github.com/rust-blockchain/evm/blob/78c49debfc65ddf3c0635edd02045a937dcc15d5/runtime/src/eval/system.rs#L432-L448

So we should use ExitReason::Revert instead of ExitReason::Error like this:

return Capture::Exit((ExitReason::Revert(ExitRevert::Reverted), encode_revert_message(&e)));

TODO:
ExitReason::Error(_) and ExitError::*.into()

return Capture::Exit((ExitReason::Error(e), None, Vec::new()));

return Capture::Exit((ExitError::CallTooDeep.into(), None, Vec::new()));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant