Navigation Menu

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

Allow claimEarnings when current round is not initialized #215

Closed
yondonfu opened this issue Apr 20, 2018 · 0 comments
Closed

Allow claimEarnings when current round is not initialized #215

yondonfu opened this issue Apr 20, 2018 · 0 comments

Comments

@yondonfu
Copy link
Member

At the moment, BondingManager.claimEarnings() cannot be invoked when the current round is not initialized. This logic should be changed to the following:

require(_endRound < roundsManager().currentRound() || (_endRound == roundsManager().currentRound() && roundsManager().currentRoundInitialized()))

If the current round is initialized, a user should be able to claim earnings through the current round. If the current round is not initialized, a user should be able to claim earnings through current round - 1. The latter condition is because if the current round is not initialized and the user claims earnings through the current round and then the current round is subsequently initialized then it is possible for a delegator to have rewards and fees associated with the round that it will not be able to claim anymore because its lastClaimRound is already set to the current round at this point.

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

No branches or pull requests

1 participant