-
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
propagate OOG from pov and MBIP5 #225
Conversation
ExitReason::Error(ExitError::OutOfGas), | ||
Default::default(), | ||
used_gas, | ||
U256([gas_limit, 0, 0, 0]), |
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.
U256
implements From<u64>
U256([gas_limit, 0, 0, 0]), | |
U256::from(gas_limit), |
} | ||
}) | ||
// This should always return `Some`, but let's play it safe. | ||
.expect("STORAGE_OOG not defined") |
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.
Instead of panic here, even if never expected, we should change the return type to Result
and let the caller handle the unexpected behaviour. It is a better design to return the Result
instead since this will be used in the runtime.
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.
Added a few remarks, but the functionality looks good to me.
propagate OOG from pov and MBIP5
propagate OOG from pov and MBIP5
propagate OOG from pov and MBIP5
No description provided.