Skip to content

Commit

Permalink
Merge pull request #53 from liquity/exp-fix-future-lookup
Browse files Browse the repository at this point in the history
Optional Fix: Future lookup
  • Loading branch information
jltqy authored Oct 21, 2024
2 parents f529432 + 36446ab commit 5e236ca
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 @@ -191,10 +191,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 5e236ca

Please sign in to comment.