func (s *State) InitiateValidatorExit(index uint32) error {
	validator := &s.ValidatorRegistry[index]
	if validator.Status != Active {
		return errors.New("validator is not active")
	}

	validator.Status = ActivePendingExit
	validator.LatestStatusChangeSlot = s.Slot
	return nil
}
// InitiateValidatorExit moves a validator from active to pending exit.
InitiateValidatorExit moves a validator from active to pending exit.
// InitiateValidatorExit moves a validator from active to pending exit .
func (s *State) InitiateValidatorExit(index uint32) error {
	validator := &s.ValidatorRegistry[index]
	if validator.Status != Active {
		return errors.New("validator is not active")
	}
	validator.Status = ActivePendingExit
	validator.LatestStatusChangeSlot = s.Slot
	return nil
}
func ( s * State ) InitiateValidatorExit ( index uint32 ) error { validator := & s . ValidatorRegistry [ index ] if validator . Status != Active { return errors . New ( " " ) } validator . Status = ActivePendingExit validator . LatestStatusChangeSlot = s . Slot return nil }
InitiateValidatorExit moves a validator from active to pending exit.
InitiateValidatorExit moves a validator from active to pending exit .