Skip to content

fix(x/gov): validate minimum self-delegation for imported governors in InitGenesis#71

Open
giunatale wants to merge 2 commits intorelease/v0.50.xfrom
giunatale/a-28
Open

fix(x/gov): validate minimum self-delegation for imported governors in InitGenesis#71
giunatale wants to merge 2 commits intorelease/v0.50.xfrom
giunatale/a-28

Conversation

@giunatale
Copy link
Copy Markdown
Collaborator

Fix A-28

@github-actions

This comment has been minimized.

}

// set governors
minSelfDelegation, _ := math.NewIntFromString(data.Params.MinGovernorSelfDelegation)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we handle this error?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no?!?!
why? Params are validated beforehand.

Why should we?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An invalid parameter can be marshaled from an invalid genesis file. It would be better if we had a clearer error description about the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants