Skip to content

Commit

Permalink
Added check for new epoch in voter.vote
Browse files Browse the repository at this point in the history
  • Loading branch information
Hesnicewithit committed Feb 4, 2024
1 parent baec95a commit 19d1175
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Voter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ contract Voter is IVoter {
);
require(block.timestamp < IVotingEscrow(veALCX).lockEnd(_tokenId), "cannot vote with expired token");

if (block.timestamp >= IMinter(minter).activePeriod() + 2 weeks) {
IMinter(minter).updatePeriod();
}

_vote(_tokenId, _poolVote, _weights, _boost);
}

Expand Down

0 comments on commit 19d1175

Please sign in to comment.