Skip to content

Commit

Permalink
Merge pull request #85 from liquity/D-A3
Browse files Browse the repository at this point in the history
Minor tweak to initiatives initialization
  • Loading branch information
bingen authored Nov 27, 2024
2 parents cbc81ff + 6356050 commit de2484f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, Ownable, IG

function registerInitialInitiatives(address[] memory _initiatives) public onlyOwner {
for (uint256 i = 0; i < _initiatives.length; i++) {
initiativeStates[_initiatives[i]] = InitiativeState(0, 0, 0, 0, 0);

// Register initial initiatives in the earliest possible epoch, which lets us make them votable immediately
// post-deployment if we so choose, by backdating the first epoch at least EPOCH_DURATION in the past.
registeredInitiatives[_initiatives[i]] = 1;
Expand Down Expand Up @@ -575,7 +573,7 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, Ownable, IG
registeredInitiatives[_initiative] = currentEpoch;

/// @audit This ensures that the initiatives has UNREGISTRATION_AFTER_EPOCHS even after the first epoch
initiativeStates[_initiative].lastEpochClaim = epoch() - 1;
initiativeStates[_initiative].lastEpochClaim = currentEpoch - 1;

emit RegisterInitiative(_initiative, msg.sender, currentEpoch);

Expand Down

0 comments on commit de2484f

Please sign in to comment.