Skip to content

Commit

Permalink
fix testForkFuzz_MultipleDepositorsStakAmountDifferentTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
anajuliabit committed Aug 25, 2024
1 parent ec25917 commit 6db0bc0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/DelegateStaking.integration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity 0.8.26;

import "@forge-std/Test.sol";

import {console} from "@forge-std/console.sol";
import {FixedPointMathLib} from "@solmate/utils/FixedPointMathLib.sol";
import {TransparentUpgradeableProxy, ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
Expand Down Expand Up @@ -175,8 +176,10 @@ contract DelegateStakingIntegrationTest is Test {
address participant = address(uint160(i));

uint256 expectedTimestamp = timeStaked[i - 1] + 365 days;
// jump the diferrence between expected and actual time
_jumpAhead(expectedTimestamp - vm.getBlockTimestamp());
if (vm.getBlockTimestamp() < expectedTimestamp) {
// jump the diferrence between expected and actual time
_jumpAhead(expectedTimestamp - vm.getBlockTimestamp());
}

vm.startPrank(participant);
uint256 rewardsReceived = delegate.claimRewards(0);
Expand Down

0 comments on commit 6db0bc0

Please sign in to comment.