Skip to content

Commit

Permalink
Removed redundant return variable (#271)
Browse files Browse the repository at this point in the history
* chore: removed redundant return variable

* chore: updated function name
  • Loading branch information
iamsahu committed Jul 18, 2024
1 parent 5874936 commit af3ee4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contracts/src/OperatorsRegistry.1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ contract OperatorsRegistryV1 is IOperatorsRegistryV1, IVersionV1, Initializable,
return (publicKeys, signatures);
}

_getCountOfValidatorsFromEachOperator(operators, fundableOperatorCount, _count);
_updateCountOfPickedValidatorsForEachOperator(operators, fundableOperatorCount, _count);

// we loop on all operators
for (uint256 idx = 0; idx < fundableOperatorCount; ++idx) {
Expand Down Expand Up @@ -716,7 +716,7 @@ contract OperatorsRegistryV1 is IOperatorsRegistryV1, IVersionV1, Initializable,
return (new bytes[](0), new bytes[](0));
}

_getCountOfValidatorsFromEachOperator(operators, fundableOperatorCount, _count);
_updateCountOfPickedValidatorsForEachOperator(operators, fundableOperatorCount, _count);

// we loop on all operators
for (uint256 idx = 0; idx < fundableOperatorCount; ++idx) {
Expand All @@ -733,11 +733,11 @@ contract OperatorsRegistryV1 is IOperatorsRegistryV1, IVersionV1, Initializable,
}
}

function _getCountOfValidatorsFromEachOperator(
function _updateCountOfPickedValidatorsForEachOperator(
OperatorsV2.CachedOperator[] memory operators,
uint256 fundableOperatorCount,
uint256 _count
) internal view returns (uint256[] memory _pickedCounts) {
) internal view {
while (_count > 0) {
// loop on operators to find the first that has fundable keys, taking into account previous loop round attributions
uint256 selectedOperatorIndex = 0;
Expand Down

0 comments on commit af3ee4c

Please sign in to comment.