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

Weak test on test_StakeOneAccountReachingMPLimit #82

Closed
3esmit opened this issue Dec 2, 2024 · 0 comments · Fixed by #90
Closed

Weak test on test_StakeOneAccountReachingMPLimit #82

3esmit opened this issue Dec 2, 2024 · 0 comments · Fixed by #90
Assignees

Comments

@3esmit
Copy link
Contributor

3esmit commented Dec 2, 2024

vm.warp(currentTime + 1);

This line add only 1 second to test.
The problem rises that 1 second might not be enough for generating 1 MP. See #52

There is no advantage in testing the rise of 1 second in time, the test would be more robust if a bigger warp is done, such as 1 year, or 1 day.

0x-r4bbit added a commit that referenced this issue Dec 4, 2024
As mentioned in #82, increasing `currentTime` by 1 second isn't enough
to actually create new MPs, so the test could return false positives.

This change increases the time between checks arbritraryly longer, such
that MPs would actually be created if the max MP wasn't reached.

Closes #82
@0x-r4bbit 0x-r4bbit moved this to Needs Review in Tasks - Smart Contracts Dec 4, 2024
@0x-r4bbit 0x-r4bbit self-assigned this Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Needs Review to Done in Tasks - Smart Contracts Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants