Skip to content

Commit

Permalink
chore: delete unused index
Browse files Browse the repository at this point in the history
see reasoning here
#100 (comment)
this allows undoing a previous fix for a stack-too-deep error, which...
helps make the logic a little clearer / easier to parse here.
  • Loading branch information
ChaoticWalrus authored and steven committed Dec 18, 2023
1 parent 5b55366 commit 2ac5c90
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/RegistryCoordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,17 @@ contract RegistryCoordinator is EIP712, Initializable, IRegistryCoordinator, ISo
socket: socket
});

uint256 kickIndex = 0;
for (uint256 i = 0; i < quorumNumbers.length; i++) {
// reference: uint8 quorumNumber = uint8(quorumNumbers[i]);
OperatorSetParam memory operatorSetParams = _quorumParams[uint8(quorumNumbers[i])];
uint8 quorumNumber = uint8(quorumNumbers[i]);
OperatorSetParam memory operatorSetParams = _quorumParams[quorumNumber];

/**
* If the new operator count for any quorum exceeds the maximum, validate
* that churn can be performed, then deregister the specified operator
*/
if (results.numOperatorsPerQuorum[i] > operatorSetParams.maxOperatorCount) {
_validateChurn({
quorumNumber: uint8(quorumNumbers[i]),
quorumNumber: quorumNumber,
totalQuorumStake: results.totalStakes[i],
newOperator: msg.sender,
newOperatorStake: results.operatorStakes[i],
Expand All @@ -251,7 +250,6 @@ contract RegistryCoordinator is EIP712, Initializable, IRegistryCoordinator, ISo
});

_deregisterOperator(operatorKickParams[i].operator, quorumNumbers[i:i+1]);
kickIndex++;
}
}
}
Expand Down

0 comments on commit 2ac5c90

Please sign in to comment.