func (v *MutableParameters) Validate() error {
	if v.MaxPackSize < minValidPackSize {
		return errors.Errorf("max pack size too small, must be >= %v", units.BytesStringBase2(minValidPackSize))
	}

	if v.MaxPackSize > maxValidPackSize {
		return errors.Errorf("max pack size too big, must be <= %v", units.BytesStringBase2(maxValidPackSize))
	}

	if v.IndexVersion < 0 || v.IndexVersion > index.Version2 {
		return errors.Errorf("invalid index version, supported versions are 1 & 2")
	}

	if err := v.EpochParameters.Validate(); err != nil {
		return errors.Wrap(err, "invalid epoch parameters")
	}

	return nil
}
// Validate validates the parameters.
Validate validates the parameters.
// Validate validates the parameters .
func (v *MutableParameters) Validate() error {
	if v.MaxPackSize < minValidPackSize {
		return errors.Errorf("max pack size too small, must be >= %v", units.BytesStringBase2(minValidPackSize))
	}
	if v.MaxPackSize > maxValidPackSize {
		return errors.Errorf("max pack size too big, must be <= %v", units.BytesStringBase2(maxValidPackSize))
	}
	if v.IndexVersion < 0 || v.IndexVersion > index.Version2 {
		return errors.Errorf("invalid index version, supported versions are 1 & 2")
	}
	if err := v.EpochParameters.Validate(); err != nil {
		return errors.Wrap(err, "invalid epoch parameters")
	}
	return nil
}
func ( v * MutableParameters ) Validate ( ) error { if v . MaxPackSize < minValidPackSize { return errors . Errorf ( " " , units . BytesStringBase2 ( minValidPackSize ) ) } if v . MaxPackSize > maxValidPackSize { return errors . Errorf ( " " , units . BytesStringBase2 ( maxValidPackSize ) ) } if v . IndexVersion < 0 || v . IndexVersion > index . Version2 { return errors . Errorf ( " " ) } if err := v . EpochParameters . Validate ( ) ; err != nil { return errors . Wrap ( err , " " ) } return nil }
Validate validates the parameters.
Validate validates the parameters .