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

Finance: handle endTime overflow for transitioning periods #254

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

sohkai
Copy link
Contributor

@sohkai sohkai commented Apr 16, 2018

We can get into cases where startTime + periodDuration causes initialization to fail (e.g. if someone's lazy and uses MAX_UINT64 as periodDuration).

This just sets endTime = max(startTime + periodDuration, MAX_UINT64).

@sohkai sohkai requested review from izqui and bingen April 16, 2018 14:02
@coveralls
Copy link

coveralls commented Apr 16, 2018

Coverage Status

Coverage increased (+0.1%) to 90.076% when pulling 854c8e0 on finance-new-period-overflow into 0094bb0 on master.

Copy link
Contributor

@bingen bingen left a comment

Choose a reason for hiding this comment

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

LGTM

@sohkai sohkai force-pushed the finance-new-period-overflow branch from e948334 to 854c8e0 Compare April 25, 2018 04:59
@sohkai sohkai merged commit 8a2f035 into master Apr 25, 2018
@sohkai sohkai deleted the finance-new-period-overflow branch April 27, 2018 02:58
ramilexe pushed a commit to ConsiderItDone/aragon-apps that referenced this pull request Dec 9, 2021
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.

3 participants