From cab8a4952a0c5cd6f5e0f3c1431e1086c69c7d34 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Mon, 15 Feb 2021 10:12:12 -0600 Subject: [PATCH] fix: use Gaia's historical_entries value --- golang/cosmos/app/app.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/golang/cosmos/app/app.go b/golang/cosmos/app/app.go index 0ae6faebbbdc..763698a1bdc0 100644 --- a/golang/cosmos/app/app.go +++ b/golang/cosmos/app/app.go @@ -546,7 +546,15 @@ func (app *GaiaApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) + res := app.mm.InitGenesis(ctx, app.appCodec, genesisState) + + // Set Historical infos in InitChain to ignore genesis params + // This is needed for IBC connections not to time out easily + stakingParams := app.StakingKeeper.GetParams(ctx) + stakingParams.HistoricalEntries = 10000 + app.StakingKeeper.SetParams(ctx, stakingParams) + + return res } // Commit tells the controller that the block is commited