Skip to content

Commit

Permalink
fix: update max block size
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Apr 3, 2024
1 parent 94090f1 commit 752a282
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,16 @@ func (app *ElysApp) Name() string { return app.BaseApp.Name() }

// BeginBlocker application updates every begin block
func (app *ElysApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
// Set max block size to 10MB
app.Logger().Info("Setting max block size to 10MB")

consensusParams, err := app.ConsensusParamsKeeper.Get(ctx)
if err != nil {
panic(fmt.Errorf("failed to get consensus params: %s", err))
}
consensusParams.Block.MaxBytes = int64(10485760)
app.ConsensusParamsKeeper.Set(ctx, consensusParams)

return app.mm.BeginBlock(ctx, req)
}

Expand Down

0 comments on commit 752a282

Please sign in to comment.