-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add apply_discount_factor to gas_parameters #15
Conversation
72c15e0
to
032abf0
Compare
lib/evmone/execution_state.hpp
Outdated
speculative_cpu_gas_consumed_ = std::max(y, 0l); | ||
cpu_gas_refund_ = std::max(-y, 0l); | ||
speculative_cpu_gas_consumed_ = std::max(y, decltype(y){0}); | ||
cpu_gas_refund_ = std::max(-y, decltype(y){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.
is it possible to eliminate the use of auto and decltype here? it seems a little bit dangerous to me to use things like auto and decltype in the scenarios that have the risk of overflow/underflow.
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 wonder if change the auto above as well can help fixing this?
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.
fixed
No description provided.