-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(x/slashing): migrate ValidatorSigningInfo to collections #17023
Conversation
…ita/coll-valSignInfo
…ita/coll-valSignInfo
Params collections.Item[types.Params] | ||
ValidatorSigningInfo collections.Map[sdk.ConsAddress, types.ValidatorSigningInfo] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random thought but are we able to make these private? params i feel yes since the module can make a query through the router to get the same info
a bit out of scope of this pr but something to think about instead of making it all public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, left one question but doesnt need to be solved in this pr
…ita/coll-valSignInfo
simapp/export.go
Outdated
info.StartHeight = 0 | ||
err = app.SlashingKeeper.ValidatorSigningInfo.Set(ctx, addr, info) | ||
if err != nil { | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cannot we return the error here? We probably should instead of panicking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we are panicking on every error in prepForZeroHeightGenesis
. To keep that consistent behaviour I put panic there instead of returning error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error is propagated back to err in line 235, so it's fine to error here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Description
Closes: #16362
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change