@@ -139,7 +139,7 @@ contract RegistryCoordinator is RegistryCoordinatorStorage {
139139
140140 /// @inheritdoc IRegistryCoordinator
141141 function disableM2QuorumRegistration () external onlyOwner {
142- require (operatorSetsEnabled, OperatorSetsNotEnabled ());
142+ require (! isM2QuorumRegistrationDisabled, M2QuorumRegistrationIsDisabled ());
143143
144144 isM2QuorumRegistrationDisabled = true ;
145145
@@ -154,16 +154,21 @@ contract RegistryCoordinator is RegistryCoordinatorStorage {
154154
155155 /// @dev override the _forceDeregisterOperator function to handle M2 quorum deregistration
156156 function _forceDeregisterOperator (address operator , bytes memory quorumNumbers ) internal virtual override {
157- if (operatorSetsEnabled) {
158- // filter out M2 quorums from the quorum numbers
159- uint256 operatorSetBitmap = quorumNumbers.orderedBytesArrayToBitmap ().minus (m2QuorumBitmap);
160- if (! operatorSetBitmap.isEmpty ()) {
161- // call the parent _forceDeregisterOperator function for operator sets quorums
162- super ._forceDeregisterOperator (operator, operatorSetBitmap.bitmapToBytesArray ());
163- }
157+ // filter out M2 quorums from the quorum numbers
158+ uint256 operatorSetBitmap = quorumNumbers.orderedBytesArrayToBitmap ().minus (m2QuorumBitmap);
159+ if (! operatorSetBitmap.isEmpty ()) {
160+ // call the parent _forceDeregisterOperator function for operator sets quorums
161+ super ._forceDeregisterOperator (operator, operatorSetBitmap.bitmapToBytesArray ());
164162 }
165163 }
166164
165+ /// @dev Hook to prevent any new quorums from being created if operator sets are not enabled
166+ function _beforeCreateQuorum (
167+ uint8 quorumNumber
168+ ) internal virtual override {
169+ require (operatorSetsEnabled, OperatorSetsNotEnabled ());
170+ }
171+
167172 /// @dev Hook to allow for any post-deregister logic
168173 function _afterDeregisterOperator (
169174 address operator ,
0 commit comments