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

fix: emissions calculation given a maximum emissions and deadline #3

Merged
merged 22 commits into from
Mar 10, 2022

Conversation

skellet0r
Copy link
Contributor

So given that we have a maximum amount of emissions that a receiver can get + a deadline, I handled it by just setting week_time = deadline in the case that the deadline is between the two time periods we are calculating emissions for.

This should be adjusted to look prettier, feels like there is duplication and the logic can be simplified.

There was an alternative way to do this as well, where we have an internal _checkpoint function that we pass parameters to, but this way seems better since it's self contained in a single function.

@bout3fiddy bout3fiddy merged commit 74d51bc into main Mar 10, 2022
@skellet0r skellet0r deleted the dev branch March 11, 2022 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants