Skip to content

Commit

Permalink
fix: use Gaia's historical_entries value
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Feb 15, 2021
1 parent b4958f1 commit cab8a49
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cab8a49

Please sign in to comment.