Message: ExecuteMsg::DisableValidator
This allows the admin to disable a previously enabled validator. Disabled validators cannot accept new stakes, but existing stakes can still be unstaked and withdrawn as usual.
Inputs
info.senderValidation: The
disable_validatorfunction verifies that theinfo.senderis the contract owner.Impact: N/A.
validator_addrValidation: Ensures the validator exists in the contract's state and is currently enabled.
Impact: This validator address gets disabled.
Branches and code coverage (including function calls)
Intended branches
If
validator_addrexists and is enabled, it is marked as disabled in the contract state.
Negative behavior
Fail if
validator_addrdoes not exist in the validator list.Fail if
validator_addris already disabled.