Message: ExecuteMsg::AddValidator
This allows the admin to add a new validator that can be staked to.
Inputs
info.senderValidation: The
add_validatorfunction verifies that theinfo.senderis the contract owner.Impact: N/A.
validator_addrValidation: The address is verified to ensure it exists in the current validator set and is not already in the contract's validator list.
Impact: This is the address of the validator to be added.
Branches and code coverage (including function calls)
Intended branches
If
validator_addris valid, it is added to the list of enabled validators in the contract state.
Negative behavior
Fail if
validator_addralready exists in the validator list.Fail if
validator_addris not part of the current validator set.