Skip to content

Commit

Permalink
improve validations on the new params
Browse files Browse the repository at this point in the history
  • Loading branch information
xmariachi committed Dec 16, 2024
1 parent a66b797 commit d343803
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/emissions/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,17 @@ func validateMinExperiencedWorkerRegrets(i uint64) error {
func validateInferenceOutlierDetectionThreshold(i alloraMath.Dec) error {
if err := ValidateDec(i); err != nil {
return err
} else if i.IsNegative() {
return ErrValidationMustBeGreaterthanZero
}
return nil
}

func validateInferenceOutlierDetectionAlpha(i alloraMath.Dec) error {
if err := ValidateDec(i); err != nil {
return err
} else if !isAlloraDecBetweenZeroAndOneInclusive(i) {
return ErrValidationMustBeBetweenZeroAndOne
}
return nil
}

0 comments on commit d343803

Please sign in to comment.