Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/32 gas optimization #313

Merged
merged 1 commit into from Jul 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions contracts/prize-pool/PrizePool.sol
Expand Up @@ -652,8 +652,9 @@ abstract contract PrizePool is PrizePoolInterface, OwnableUpgradeable, Reentranc
for (i = 0; i < users.length; i++) {
address user = users[i];
if (_unlockTimestamps[user] <= _currentTime()) {
totalWithdrawal = totalWithdrawal.add(_timelockBalances[user]);
balances[i] = _timelockBalances[user];
uint256 _userTimelockBalances = _timelockBalances[user];
totalWithdrawal = totalWithdrawal.add(_userTimelockBalances);
balances[i] = _userTimelockBalances;
delete _timelockBalances[user];
}
}
Expand Down