Skip to content

Commit

Permalink
Add named return param
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Oct 29, 2024
1 parent 59a5c4f commit 718edef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions contracts/sfc/SFCLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,9 @@ contract SFCLib is SFCBase {

function _stashRewards(address delegator, uint256 toValidatorID) internal returns (bool updated) {
uint256 nonStashedReward = _newRewards(delegator, toValidatorID);
if (nonStashedReward == 0) {
return false;
}
stashedRewardsUntilEpoch[delegator][toValidatorID] = _highestPayableEpoch(toValidatorID);
_rewardsStash[delegator][toValidatorID] = _rewardsStash[delegator][toValidatorID] + nonStashedReward;
return true;
return nonStashedReward != 0;
}

function _claimRewards(address delegator, uint256 toValidatorID) internal returns (uint256) {
Expand Down

0 comments on commit 718edef

Please sign in to comment.