Skip to content

Commit

Permalink
take strats out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Sep 6, 2024
1 parent 716055c commit d4d7f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contracts/core/StakeRootCompendium.sol
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ contract StakeRootCompendium is StakeRootCompendiumStorage {
);
IAVSDirectory.OperatorSet memory operatorSet = operatorSets[operatorSetIndex];
address[] memory operators = avsDirectory.getOperatorsInOperatorSet(operatorSet, startOperatorIndex, numOperators);
(IStrategy[] memory strategies, uint256[] memory multipliers) = _getStrategiesAndMultipliers(operatorSet);

OperatorLeaf[] memory operatorLeaves = new OperatorLeaf[](operators.length);
for (uint256 i = 0; i < operatorLeaves.length; i++) {
// calculate the weighted sum of the operator's shares for the strategies given the multipliers
(IStrategy[] memory strategies, uint256[] memory multipliers) = _getStrategiesAndMultipliers(operatorSet);
(uint256 delegatedStake, uint256 slashableStake) = _getStakes(operatorSet, strategies, multipliers, operators[i]);

operatorLeaves[i] = OperatorLeaf({
Expand Down

0 comments on commit d4d7f4e

Please sign in to comment.