-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add unclaimed reward invariant test #80
Conversation
54da214
to
738740b
Compare
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.
Looks great @garyghayrat. One nit on naming, but we can merge after fixing!
test/Staker.invariants.t.sol
Outdated
@@ -77,6 +77,13 @@ contract StakerInvariants is Test { | |||
); | |||
} | |||
|
|||
function invariant_Sum_of_unclaimed_reward_should_be_less_than_or_equal_to_total_rewards() public { |
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.
We should consider extending the last part of the name for clarity: _total_rewards_balance()
. Saying simply "total rewards" makes it sound like it could mean all rewards ever.
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.
renamed in 8d2844e
Coverage after merging test/add-sum-of-rewards-invariant into main will be
Coverage Report
|
closes #15