Skip to content

Commit 0a58033

Browse files
sontrinh16mergify[bot]
authored andcommitted
fix: NewIntegrationApp does not write default genesis to state (#21006)
(cherry picked from commit 6f1592d) # Conflicts: # testutil/integration/router.go
1 parent 7d0d59d commit 0a58033

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4242

4343
* [#20939](https://github.com/cosmos/cosmos-sdk/pull/20939) Fix collection reverse iterator to include `pagination.key` in the result.
4444
* (client/grpc) [#20969](https://github.com/cosmos/cosmos-sdk/pull/20969) Fix `node.NewQueryServer` method not setting `cfg`.
45+
* (testutil/integration) [#21006](https://github.com/cosmos/cosmos-sdk/pull/21006) Fix `NewIntegrationApp` method not writing default genesis to state
4546

4647
## [v0.50.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.8) - 2024-07-15
4748

testutil/integration/router.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,19 @@ func NewIntegrationApp(
5959
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
6060
bApp.MountKVStores(keys)
6161

62+
<<<<<<< HEAD
6263
bApp.SetInitChainer(func(ctx sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) {
6364
for _, mod := range modules {
6465
if m, ok := mod.(module.HasGenesis); ok {
6566
m.InitGenesis(ctx, appCodec, m.DefaultGenesis(appCodec))
67+
=======
68+
bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.InitChainRequest) (*cmtabcitypes.InitChainResponse, error) {
69+
for _, mod := range modules {
70+
if m, ok := mod.(module.HasGenesis); ok {
71+
if err := m.InitGenesis(sdkCtx, m.DefaultGenesis()); err != nil {
72+
return nil, err
73+
}
74+
>>>>>>> 6f1592d3d (fix: NewIntegrationApp does not write default genesis to state (#21006))
6675
}
6776
}
6877

0 commit comments

Comments
 (0)