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

Change SimApp to have public keepers #4894

Merged
merged 5 commits into from
Aug 13, 2019
Merged

Conversation

colin-axner
Copy link
Contributor

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 explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Aug 12, 2019

Codecov Report

Merging #4894 into master will increase coverage by <.01%.
The diff coverage is 59.45%.

@@            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{
Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

@fedekunze fedekunze Aug 12, 2019

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

Copy link
Contributor

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.

Copy link
Collaborator

@fedekunze fedekunze left a 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

Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Contributor

@alexanderbez alexanderbez left a 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{
Copy link
Contributor

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
Copy link
Contributor

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 👍

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK ⚡️

@alexanderbez alexanderbez merged commit 81f86fe into master Aug 13, 2019
@alexanderbez alexanderbez deleted the colin/4893-exportable-simapp branch August 13, 2019 20:59
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update SimApp to have exportable keepers
4 participants