func (s *State) UpdateValidatorStatus(index uint32, status uint64, c *config.Config) error {
	if status == Active {
		err := s.ActivateValidator(index)
		return err
	} else if status == ActivePendingExit {
		err := s.InitiateValidatorExit(index)
		return err
	} else if status == ExitedWithPenalty || status == ExitedWithoutPenalty {
		err := s.ExitValidator(index, status, c)
		return err
	}
	return nil
}
// UpdateValidatorStatus moves a validator to a specific status.
UpdateValidatorStatus moves a validator to a specific status.
// UpdateValidatorStatus moves a validator to a specific status .
func (s *State) UpdateValidatorStatus(index uint32, status uint64, c *config.Config) error {
	if status == Active {
		err := s.ActivateValidator(index)
		return err
	} else if status == ActivePendingExit {
		err := s.InitiateValidatorExit(index)
		return err
	} else if status == ExitedWithPenalty || status == ExitedWithoutPenalty {
		err := s.ExitValidator(index, status, c)
		return err
	}
	return nil
}
func ( s * State ) UpdateValidatorStatus ( index uint32 , status uint64 , c * config . Config ) error { if status == Active { err := s . ActivateValidator ( index ) return err } else if status == ActivePendingExit { err := s . InitiateValidatorExit ( index ) return err } else if status == ExitedWithPenalty || status == ExitedWithoutPenalty { err := s . ExitValidator ( index , status , c ) return err } return nil }
UpdateValidatorStatus moves a validator to a specific status.
UpdateValidatorStatus moves a validator to a specific status .