-
Notifications
You must be signed in to change notification settings - Fork 160
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
Reward actor update #619
Reward actor update #619
Conversation
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.
lgtm
vm/actor/src/builtin/reward/logic.rs
Outdated
prev_theta: BigInt, | ||
curr_theta: BigInt, | ||
) -> TokenAmount { | ||
let mut simple_reward = SIMPLE_TOTAL.clone() * &*EXP_LAM_SUB_ONE; |
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.
let mut simple_reward = SIMPLE_TOTAL.clone() * &*EXP_LAM_SUB_ONE; | |
let mut simple_reward = &*SIMPLE_TOTAL * &*EXP_LAM_SUB_ONE; |
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 actually don't fully understand how this works (seems like it would compile to the same thing because the static would have to be reallocated anyway) But I will make this change here and a line below in case it's more optimized
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #563
Other information and links