diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e6c98fe143..b1ea94db8fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#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 ## [v0.50.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.8) - 2024-07-15 diff --git a/tests/integration/distribution/keeper/msg_server_test.go b/tests/integration/distribution/keeper/msg_server_test.go index 86a2d8e626e2..fbb883da63bc 100644 --- a/tests/integration/distribution/keeper/msg_server_test.go +++ b/tests/integration/distribution/keeper/msg_server_test.go @@ -276,8 +276,8 @@ func TestMsgWithdrawDelegatorReward(t *testing.T) { } height := f.app.LastBlockHeight() - _, err = f.distrKeeper.GetPreviousProposerConsAddr(f.sdkCtx) - assert.Error(t, err, "previous proposer not set") + proposerAddr, _ := f.distrKeeper.GetPreviousProposerConsAddr(f.sdkCtx) + assert.Equal(t, proposerAddr.Empty(), true) for _, tc := range testCases { tc := tc diff --git a/testutil/integration/router.go b/testutil/integration/router.go index 4270d493ad8c..a96c7d72d197 100644 --- a/testutil/integration/router.go +++ b/testutil/integration/router.go @@ -59,10 +59,10 @@ func NewIntegrationApp( bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName)) bApp.MountKVStores(keys) - bApp.SetInitChainer(func(ctx sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) { + bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.RequestInitChain) (*cmtabcitypes.ResponseInitChain, error) { for _, mod := range modules { if m, ok := mod.(module.HasGenesis); ok { - m.InitGenesis(ctx, appCodec, m.DefaultGenesis(appCodec)) + m.InitGenesis(sdkCtx, appCodec, m.DefaultGenesis(appCodec)) } }