-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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/distribution): audit QA #21316
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2f1bcec
refactor(x/distribution): audit QA
lucaslopezf 29be888
Linting issues
lucaslopezf 2756bab
Linting issues
lucaslopezf 9a1da06
Merge branch 'main' into lucas/distribution-audit
lucaslopezf de2f457
feat: export genesis in simapp v2 (#21199)
randygrok b9c41e9
chore: fix spelling errors (#21327)
github-prbot 9ab0a5e
refactor(x/mint): v0.52 audit x/mint (#21301)
JulianToledano 81c30bb
merge
lucaslopezf 08d22e5
fix(x/authz): bring back msg response in `DispatchActions` (#21044)
julienrbrt c67fbb4
feat(schema): specify JSON mapping (#21243)
aaronc bd8bd34
Merge branch 'main' into lucas/distribution-audit
lucaslopezf 86b23ec
Solve some comments
lucaslopezf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm not sure about this change, but I think we should be consistent
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.
This is a constant that has been there forever, not sure either, I guess it's fine. Maybe it gives us an opportunity to add a small comment on why it's 2
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.
Sorry if I didn't explain well hehe, I talked about the panic replace
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.
Was the function returning an error before?
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.
Yes, the function has three returns: two of them return an error, and this one returned a panic. That's why I think we should return an error to maintain consistency. However, I'm a bit confused about when we should use panic and when we shouldn't, or if this is a technical debt we've had from before
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.
If you can look at the file history to see when it happened then we can easily know if it was on purpose on not. I haven't checked the code path, mostly returning an error or panicking results to the same thing (since v0.47) while before we had to panic, so it is likely that it is just something that should have been refactored but haven't but it would be good to verify.
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.
Reviewing the history, the panic has been there since 01/23/19, from the very first time the function was created. Therefore, I think the refactor is fine. Now, just to understand, so today in the SDK it's the same to return panic as to return an error, but we are standardizing everything to return errors, right?