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

	validator.Status = Active
	validator.LatestStatusChangeSlot = s.Slot
	deltaChainTip, err := GetNewValidatorRegistryDeltaChainTip(s.ValidatorRegistryDeltaChainTip, index, validator.Pubkey, ActivationFlag)
	if err != nil {
		return err
	}
	s.ValidatorRegistryDeltaChainTip = deltaChainTip
	return nil
}
// ActivateValidator activates a validator in the state at a certain index.
ActivateValidator activates a validator in the state at a certain index.
// ActivateValidator activates a validator in the state at a certain index .
func (s *State) ActivateValidator(index uint32) error {
	validator := &s.ValidatorRegistry[index]
	if validator.Status != PendingActivation {
		return errors.New("validator is not pending activation")
	}
	validator.Status = Active
	validator.LatestStatusChangeSlot = s.Slot
	deltaChainTip, err := GetNewValidatorRegistryDeltaChainTip(s.ValidatorRegistryDeltaChainTip, index, validator.Pubkey, ActivationFlag)
	if err != nil {
		return err
	}
	s.ValidatorRegistryDeltaChainTip = deltaChainTip
	return nil
}
func ( s * State ) ActivateValidator ( index uint32 ) error { validator := & s . ValidatorRegistry [ index ] if validator . Status != PendingActivation { return errors . New ( " " ) } validator . Status = Active validator . LatestStatusChangeSlot = s . Slot deltaChainTip , err := GetNewValidatorRegistryDeltaChainTip ( s . ValidatorRegistryDeltaChainTip , index , validator . Pubkey , ActivationFlag ) if err != nil { return err } s . ValidatorRegistryDeltaChainTip = deltaChainTip return nil }
ActivateValidator activates a validator in the state at a certain index.
ActivateValidator activates a validator in the state at a certain index .