Unconstrained Snapshot While Setting Operator Limit
Function `setOperatorLimit` as the name says, allows the `SYS_ADMIN` to set/update the staking limit for an operator. The function ensures that if the limit is being increased, the `_snapshot` must be ahead of the last validator edit(block.number at which the last validator edit occurred). However, the parameter `_snapshot` is unconstrained and can be any number. Also, the functions `addValidators` and `removeValidators` update the `block.number` signifying the last validator edit, but never constrain the new edits with it. Since there are no publicly available functions to access this value, makes the functionality even more confusing and may be unnecessary.\\n```\\nif (\\n operators.value[\\_operatorIndex].limit < \\_limit &&\\n StakingContractStorageLib.getLastValidatorEdit() > \\_snapshot\\n) {\\n revert LastEditAfterSnapshot();\\n}\\n```\\n
If the functionality is not needed, consider removing it. Otherwise, add some necessary logic to either constrain the last validator edit or add public functions for the users to access it.
```\\nif (\\n operators.value[\\_operatorIndex].limit < \\_limit &&\\n StakingContractStorageLib.getLastValidatorEdit() > \\_snapshot\\n) {\\n revert LastEditAfterSnapshot();\\n}\\n```\\n