Skip to content

Commit

Permalink
test: make max MP test stronger
Browse files Browse the repository at this point in the history
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
  • Loading branch information
0x-r4bbit committed Dec 5, 2024
1 parent 9374025 commit 6814995
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/RewardsStreamerMP.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ contract StakeTest is RewardsStreamerMPTest {

// move forward in time to check we're not producing more MP
currentTime = vm.getBlockTimestamp();
vm.warp(currentTime + 1);
// increasing time by some big enough time such that MPs are actually generated
vm.warp(currentTime + 14 days);

streamer.updateGlobalState();
streamer.updateAccountMP(vaults[alice]);
Expand Down

0 comments on commit 6814995

Please sign in to comment.