Skip to content

Commit

Permalink
use memory _firstDrawStartsAt
Browse files Browse the repository at this point in the history
Co-authored-by: Pierrick Turelier <pierrick@turelier.com>
  • Loading branch information
trmid and PierrickGT authored Oct 3, 2023
1 parent ad748ba commit 82d36c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PrizePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ contract PrizePool is TieredLiquidityDistributor, Ownable {
/// @return The draw period ID that the current block is in
function _currentDrawId() internal view returns (uint24) {
uint48 _firstDrawStartsAt = firstDrawStartsAt;
return (block.timestamp < _firstDrawStartsAt) ? 1 : (uint24((block.timestamp - firstDrawStartsAt) / drawPeriodSeconds) + 1);
return (block.timestamp < _firstDrawStartsAt) ? 1 : (uint24((block.timestamp - _firstDrawStartsAt) / drawPeriodSeconds) + 1);
}

/// @notice Returns the open draw ID.
Expand Down

0 comments on commit 82d36c5

Please sign in to comment.