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

Fix add-genesis-account in simd #7069

Merged
merged 9 commits into from
Aug 17, 2020
Merged

Fix add-genesis-account in simd #7069

merged 9 commits into from
Aug 17, 2020

Conversation

sahith-narahari
Copy link
Contributor

@sahith-narahari sahith-narahari commented Aug 17, 2020

Description

Ref: #7037

  • Add test for AddGenesisAccountCmd

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • 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.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #7069 into master will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #7069      +/-   ##
==========================================
+ Coverage   54.66%   54.78%   +0.11%     
==========================================
  Files         541      541              
  Lines       36887    36887              
==========================================
+ Hits        20165    20208      +43     
+ Misses      15077    15023      -54     
- Partials     1645     1656      +11     

@@ -140,7 +141,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa
}
authGenState.Accounts = genAccs

authGenStateBz, err := cdc.MarshalJSON(authGenState)
authGenStateBz, err := json.MarshalIndent(authGenState, "", "")
Copy link
Contributor

@amaury1093 amaury1093 Aug 17, 2020

Choose a reason for hiding this comment

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

should we add a test for this command?

In #7037, I added a test in simapp/simd/cmd/cmd_test.go. But maybe they are not perfect there (ref: #7037 (comment)). Were do you think they should go @alexanderbez?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, they're tested where they're defined. We can test this command in this package as you've done.

@amaury1093 amaury1093 mentioned this pull request Aug 17, 2020
9 tasks
@alessio alessio mentioned this pull request Aug 17, 2020
9 tasks
@jgimeno
Copy link
Contributor

jgimeno commented Aug 17, 2020

Thanks for the fix @sahith-narahari , waiting for the test so we don't break the simd that much :D

@sahith-narahari sahith-narahari added the A:automerge Automatically merge PR once all prerequisites pass. label Aug 17, 2020
@mergify mergify bot merged commit 24bc891 into master Aug 17, 2020
@mergify mergify bot deleted the sahith/fix-add-genacc branch August 17, 2020 21:32
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* Update genaccounts to use encoding/json

* Fix add genesis accounts

* Add test for genaccounts

* Code cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants