-
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
genesis: Ensure there are no duplicate accounts in genesis file #2275
Conversation
This also contains a light refactor of genesis state parsing, so that the tests file didn't duplicate a lot of this code.
550f400
to
373eff6
Compare
cmd/gaia/app/genesis.go
Outdated
// TODO: Ensure all state machine parameters are in genesis (#1704) | ||
func GaiaValidateGenesisState(cdc *wire.Codec, genesisState GenesisState) (err error) { | ||
err = validateGenesisStateAccounts(genesisState.Accounts) | ||
if err != nil { |
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 know this is kind of weird, I left this like this, as there will be more tests here as more todo's are completed.
Codecov Report
@@ Coverage Diff @@
## develop #2275 +/- ##
===========================================
+ Coverage 63.74% 63.83% +0.08%
===========================================
Files 140 140
Lines 8645 8666 +21
===========================================
+ Hits 5511 5532 +21
+ Misses 2755 2754 -1
- Partials 379 380 +1 |
@ValarDragon Looks like there's a merge conflict now. |
Conflict fixed! |
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, we should add more tests in the future
This also contains a light refactor of genesis state parsing, so that
the tests file didn't duplicate a lot of this code.
Handles one of the items in #2229. This is also the only test that verifies any of the genesis file code AFAIK (albeit not much)
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/
) - n/aAdded entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: