-
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
Change SimApp to have public keepers #4894
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4894 +/- ##
==========================================
+ Coverage 54.03% 54.04% +<.01%
==========================================
Files 269 269
Lines 17130 17141 +11
==========================================
+ Hits 9256 9263 +7
- Misses 7186 7190 +4
Partials 688 688 |
simapp/app.go
Outdated
@@ -57,7 +57,7 @@ var ( | |||
) | |||
|
|||
// module account permissions | |||
maccPerms = map[string][]string{ | |||
MaccPerms = map[string][]string{ |
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 don't see the need of making this public as it's only used on this file
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 an external module want to have their own module account's they need to recreate the supply keeper with their added module accounts. It can be useful to reuse the existing mapping rather than duplicating it with some extra additions. I could keep this private and add a getter function?
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.
true true. It's fine as is bc it's not internally part of the SimApp
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.
Since this map is now public, it can be modified; can be dangerous. I'd rather see it private and expose a getter that dups it.
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 pending the comment I left above
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
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; One minor nit
simapp/app.go
Outdated
@@ -57,7 +57,7 @@ var ( | |||
) | |||
|
|||
// module account permissions | |||
maccPerms = map[string][]string{ | |||
MaccPerms = map[string][]string{ |
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.
Since this map is now public, it can be modified; can be dangerous. I'd rather see it private and expose a getter that dups it.
@@ -0,0 +1 @@ | |||
#4893 Change SimApp keepers to be public and add getter functions for keys and codec |
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.
Let's remove this file and copy contents to CHANGELOG.md
👍
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.
ACK ⚡️
fixes #4893
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [-t <tag>] [-m <msg>]
Re-reviewed
Files changed
in the github PR explorerFor Admin Use: