Skip to content

Commit

Permalink
fix: explicitly prevent loading future epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
GalloDaSballo committed Oct 19, 2024
1 parent 295ac1a commit 36446ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/BribeInitiative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ contract BribeInitiative is IInitiative, IBribeInitiative {
}

function _loadTotalLQTYAllocation(uint16 _epoch) private view returns (uint88, uint32) {
require(_epoch <= governance.epoch(), "No future Lookup");
return _decodeLQTYAllocation(totalLQTYAllocationByEpoch.items[_epoch].value);
}

function _loadLQTYAllocation(address _user, uint16 _epoch) private view returns (uint88, uint32) {
require(_epoch <= governance.epoch(), "No future Lookup");
return _decodeLQTYAllocation(lqtyAllocationByUserAtEpoch[_user].items[_epoch].value);
}

Expand Down

0 comments on commit 36446ab

Please sign in to comment.