Skip to content

Commit

Permalink
fix: NewIntegrationApp does not write default genesis to state (#21006)
Browse files Browse the repository at this point in the history
  • Loading branch information
sontrinh16 authored Jul 21, 2024
1 parent e22890b commit 6f1592d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* [#19851](https://github.com/cosmos/cosmos-sdk/pull/19851) Fix some places in which we call Remove inside a Walk (x/staking and x/gov).
* [#20939](https://github.com/cosmos/cosmos-sdk/pull/20939) Fix collection reverse iterator to include `pagination.key` in the result.
* (client/grpc) [#20969](https://github.com/cosmos/cosmos-sdk/pull/20969) Fix `node.NewQueryServer` method not setting `cfg`.
* (testutil/integration) [#21006](https://github.com/cosmos/cosmos-sdk/pull/21006) Fix `NewIntegrationApp` method not writing default genesis to state

### API Breaking Changes

Expand Down
4 changes: 2 additions & 2 deletions testutil/integration/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func NewIntegrationApp(
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
bApp.MountKVStores(keys)

bApp.SetInitChainer(func(ctx sdk.Context, _ *cmtabcitypes.InitChainRequest) (*cmtabcitypes.InitChainResponse, error) {
bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.InitChainRequest) (*cmtabcitypes.InitChainResponse, error) {
for _, mod := range modules {
if m, ok := mod.(module.HasGenesis); ok {
if err := m.InitGenesis(ctx, m.DefaultGenesis()); err != nil {
if err := m.InitGenesis(sdkCtx, m.DefaultGenesis()); err != nil {
return nil, err
}
}
Expand Down

0 comments on commit 6f1592d

Please sign in to comment.