@@ -155,10 +155,14 @@ contract RegistryCoordinator is
155
155
156
156
// For each quorum, validate that the new operator count does not exceed the maximum
157
157
// (If it does, an operator needs to be replaced -- see `registerOperatorWithChurn`)
158
- require (
159
- numOperatorsPerQuorum[0 ] <= _quorumParams[0 ].maxOperatorCount,
160
- "qMaxOp "
161
- );
158
+ for (uint256 i = 0 ; i < quorumNumbers.length ; i++ ) {
159
+ uint8 quorumNumber = uint8 (quorumNumbers[i]);
160
+
161
+ require (
162
+ numOperatorsPerQuorum[i] <= _quorumParams[quorumNumber].maxOperatorCount,
163
+ "c "
164
+ );
165
+ }
162
166
}
163
167
164
168
/**
@@ -212,25 +216,26 @@ contract RegistryCoordinator is
212
216
213
217
// Check that each quorum's operator count is below the configured maximum. If the max
214
218
// is exceeded, use `operatorKickParams` to deregister an existing operator to make space
215
- OperatorSetParam memory operatorSetParams = _quorumParams[uint8 (quorumNumbers[0 ])];
216
-
217
- /**
218
- * If the new operator count for any quorum exceeds the maximum, validate
219
- * that churn can be performed, then deregister the specified operator
220
- */
221
- if (results.numOperatorsPerQuorum[0 ] > operatorSetParams.maxOperatorCount) {
222
- _validateChurn ({
223
- quorumNumber: uint8 (quorumNumbers[0 ]),
224
- totalQuorumStake: results.totalStakes[0 ],
225
- newOperator: msg .sender ,
226
- newOperatorStake: results.operatorStakes[0 ],
227
- kickParams: operatorKickParams[0 ],
228
- setParams: operatorSetParams
229
- });
219
+ for (uint256 i = 0 ; i < quorumNumbers.length ; i++ ) {
220
+ OperatorSetParam memory operatorSetParams = _quorumParams[uint8 (quorumNumbers[i])];
230
221
231
- _deregisterOperator (operatorKickParams[0 ].operator, quorumNumbers[0 :1 ]);
222
+ /**
223
+ * If the new operator count for any quorum exceeds the maximum, validate
224
+ * that churn can be performed, then deregister the specified operator
225
+ */
226
+ if (results.numOperatorsPerQuorum[i] > operatorSetParams.maxOperatorCount) {
227
+ _validateChurn ({
228
+ quorumNumber: uint8 (quorumNumbers[i]),
229
+ totalQuorumStake: results.totalStakes[i],
230
+ newOperator: msg .sender ,
231
+ newOperatorStake: results.operatorStakes[i],
232
+ kickParams: operatorKickParams[i],
233
+ setParams: operatorSetParams
234
+ });
235
+
236
+ _deregisterOperator (operatorKickParams[i].operator, quorumNumbers[i:i+1 ]);
237
+ }
232
238
}
233
-
234
239
}
235
240
236
241
/**
0 commit comments