R4R [Staging PR 2/3] genesis generalization#4128
R4R [Staging PR 2/3] genesis generalization#4128rigelrozanski wants to merge 19 commits intorigel/genesis-generalizationfrom
Conversation
cmd/gaia/app/app.go
Outdated
| var moduleBasics []sdk.AppModuleBasics | ||
|
|
||
| func init() { | ||
| moduleBasics := []sdk.AppModuleBasics{ |
There was a problem hiding this comment.
ineffectual assignment to moduleBasics (from ineffassign)
There was a problem hiding this comment.
Good to know that this thing actually works :)
Codecov Report
@@ Coverage Diff @@
## rigel/genesis-generalization #4128 +/- ##
===============================================================
Coverage ? 59.03%
===============================================================
Files ? 222
Lines ? 15351
Branches ? 0
===============================================================
Hits ? 9062
Misses ? 5672
Partials ? 617 |
fedekunze
left a comment
There was a problem hiding this comment.
looking good so far. Sorry for being picky, I added some suggestions on variable naming
| func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate { | ||
| var genesisState GenesisState | ||
| moduleCdc.MustUnmarshalJSON(data, &genesisState) | ||
| InitGenesis(ctx, a.accountKeeper, a.feeCollectionKeeper, genesisState) |
There was a problem hiding this comment.
| InitGenesis(ctx, a.accountKeeper, a.feeCollectionKeeper, genesisState) | |
| InitGenesis(ctx, appModule.accountKeeper, appModule.feeCollectionKeeper, genesisState) |
There was a problem hiding this comment.
see first comment
| } | ||
|
|
||
| // module export genesis | ||
| func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { |
There was a problem hiding this comment.
| func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { | |
| func (appModule AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { |
There was a problem hiding this comment.
see first comment
|
|
||
| // module export genesis | ||
| func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { | ||
| gs := ExportGenesis(ctx, a.accountKeeper, a.feeCollectionKeeper) |
There was a problem hiding this comment.
| gs := ExportGenesis(ctx, a.accountKeeper, a.feeCollectionKeeper) | |
| gs := ExportGenesis(ctx, appModule.accountKeeper, appModule.feeCollectionKeeper) |
There was a problem hiding this comment.
see first comment
|
|
||
| // module export genesis | ||
| func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { | ||
| gs := ExportGenesis(ctx, a.keeper) |
There was a problem hiding this comment.
| gs := ExportGenesis(ctx, a.keeper) | |
| gs := ExportGenesis(ctx, appModule.keeper) |
There was a problem hiding this comment.
see first comment
| moduleCdc.MustUnmarshalJSON(data, &genesisState) | ||
| InitGenesis(ctx, a.keeper, genesisState) | ||
|
|
||
| a.keeper.AssertInvariants(ctx, a.logger) |
There was a problem hiding this comment.
| a.keeper.AssertInvariants(ctx, a.logger) | |
| appModule.keeper.AssertInvariants(ctx, appModule.logger) |
There was a problem hiding this comment.
see first comment
|
|
||
| // module export genesis | ||
| func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { | ||
| gs := ExportGenesis(ctx, a.keeper) |
There was a problem hiding this comment.
| gs := ExportGenesis(ctx, a.keeper) | |
| gs := ExportGenesis(ctx, appModule.keeper) |
|
closing in favour of #4159 |
Staging PR
Downstream #4033
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:
sdkch add [section] [stanza] [message]rereviewed
Files changedin the github PR explorerFor Admin Use: