Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zetacore observer : add validation for negative ballot maturity blocks #1983

Closed
kingpinXD opened this issue Apr 3, 2024 · 1 comment
Closed
Assignees

Comments

@kingpinXD
Copy link
Contributor

The validation for Ballot maturity blocks should include a check for negative values. We should not allow a negative value to be set for this

func validateBallotMaturityBlocks(i interface{}) error {
	v, ok := i.(int64)
	if !ok {
		return fmt.Errorf("invalid parameter type: %T", i)
	}
        if v < 0 {
               return an error
       }
	return nil
}
@skosito skosito self-assigned this Apr 18, 2024
@skosito
Copy link
Contributor

skosito commented May 6, 2024

closed with #2100

@skosito skosito closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants