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

Reward actor update #619

Merged
merged 9 commits into from
Aug 13, 2020
Merged

Reward actor update #619

merged 9 commits into from
Aug 13, 2020

Conversation

austinabell
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Self explanatory

Reference issue to close (if applicable)

Closes #563

Other information and links

Copy link
Member

@ec2 ec2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

prev_theta: BigInt,
curr_theta: BigInt,
) -> TokenAmount {
let mut simple_reward = SIMPLE_TOTAL.clone() * &*EXP_LAM_SUB_ONE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let mut simple_reward = SIMPLE_TOTAL.clone() * &*EXP_LAM_SUB_ONE;
let mut simple_reward = &*SIMPLE_TOTAL * &*EXP_LAM_SUB_ONE;

Copy link
Contributor Author

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

@austinabell austinabell merged commit 1b43ad5 into main Aug 13, 2020
@austinabell austinabell deleted the austin/actup/reward branch August 13, 2020 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update reward actor
3 participants