Address PR comments

This commit is contained in:
Amir Bandeali 2019-09-23 21:02:29 -07:00
parent 50b02a4a55
commit b6a96cea23
2 changed files with 7 additions and 7 deletions

View File

@ -147,7 +147,7 @@ contract MixinStorage is
IStructs.UnfinalizedState public unfinalizedState; IStructs.UnfinalizedState public unfinalizedState;
/// @dev The WETH balance of this contract that is reserved for pool reward payouts. /// @dev The WETH balance of this contract that is reserved for pool reward payouts.
uint256 _wethReservedForPoolRewards; uint256 internal _wethReservedForPoolRewards;
/// @dev Adds owner as an authorized address. /// @dev Adds owner as an authorized address.
constructor() constructor()

View File

@ -200,7 +200,7 @@ contract MixinStakingPoolRewards is
if (membersReward > 0) { if (membersReward > 0) {
// Increment the balance of the pool // Increment the balance of the pool
_incrementPoolRewards(poolId, membersReward); _increasePoolRewards(poolId, membersReward);
// Fetch the last epoch at which we stored an entry for this pool; // Fetch the last epoch at which we stored an entry for this pool;
// this is the most up-to-date cumulative rewards for this pool. // this is the most up-to-date cumulative rewards for this pool.
@ -293,7 +293,7 @@ contract MixinStakingPoolRewards is
} }
// Decrement the balance of the pool // Decrement the balance of the pool
_decrementPoolRewards(poolId, balance); _decreasePoolRewards(poolId, balance);
// Withdraw the member's WETH balance // Withdraw the member's WETH balance
_getWethContract().transfer(member, balance); _getWethContract().transfer(member, balance);
@ -428,20 +428,20 @@ contract MixinStakingPoolRewards is
} }
} }
/// @dev Increments rewards for a pool. /// @dev Increases rewards for a pool.
/// @param poolId Unique id of pool. /// @param poolId Unique id of pool.
/// @param amount Amount to increment rewards by. /// @param amount Amount to increment rewards by.
function _incrementPoolRewards(bytes32 poolId, uint256 amount) function _increasePoolRewards(bytes32 poolId, uint256 amount)
private private
{ {
rewardsByPoolId[poolId] = rewardsByPoolId[poolId].safeAdd(amount); rewardsByPoolId[poolId] = rewardsByPoolId[poolId].safeAdd(amount);
_wethReservedForPoolRewards = _wethReservedForPoolRewards.safeAdd(amount); _wethReservedForPoolRewards = _wethReservedForPoolRewards.safeAdd(amount);
} }
/// @dev Decrements rewards for a pool. /// @dev Decreases rewards for a pool.
/// @param poolId Unique id of pool. /// @param poolId Unique id of pool.
/// @param amount Amount to decrement rewards by. /// @param amount Amount to decrement rewards by.
function _decrementPoolRewards(bytes32 poolId, uint256 amount) function _decreasePoolRewards(bytes32 poolId, uint256 amount)
private private
{ {
rewardsByPoolId[poolId] = rewardsByPoolId[poolId].safeSub(amount); rewardsByPoolId[poolId] = rewardsByPoolId[poolId].safeSub(amount);