The _calculatePendingRewards can run out of gas
The reward rate in STokens can be changed, and the history of these changes are stored in the contract:\\n```\\nfunction setRewardRate(uint256 rewardRate)\\n public\\n virtual\\n override\\n returns (bool success)\\n{\\n // range checks for rewardRate. Since rewardRate cannot be more than 100%, the max cap\\n // is \\_valueDivisor \\* 100, which then brings the fees to 100 (percentage)\\n require(rewardRate <= \\_valueDivisor.mul(100), "ST17");\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "ST2");\\n \\_rewardRate.push(rewardRate);\\n \\_lastMovingRewardTimestamp.push(block.timestamp);\\n emit SetRewardRate(rewardRate);\\n\\n return true;\\n}\\n```\\n\\nWhen the reward is calculated `for` each user, all changes of the `_rewardRate` are considered. So there is a `for` loop that iterates over all changes since the last reward update. If the reward rate was changed many times, the `_calculatePendingRewards` function could run out of gas.
Provide an option to partially update the reward, so the full update can be split in multiple transactions.
```\\nfunction setRewardRate(uint256 rewardRate)\\n public\\n virtual\\n override\\n returns (bool success)\\n{\\n // range checks for rewardRate. Since rewardRate cannot be more than 100%, the max cap\\n // is \\_valueDivisor \\* 100, which then brings the fees to 100 (percentage)\\n require(rewardRate <= \\_valueDivisor.mul(100), "ST17");\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "ST2");\\n \\_rewardRate.push(rewardRate);\\n \\_lastMovingRewardTimestamp.push(block.timestamp);\\n emit SetRewardRate(rewardRate);\\n\\n return true;\\n}\\n```\\n