Skip to content

Commit

Permalink
chore(cosmos): reflect new default max block size
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Nov 2, 2023
1 parent cd2a341 commit d4af8cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"

gaiaappparams "github.com/Agoric/agoric-sdk/golang/cosmos/app/params"
Expand Down Expand Up @@ -795,7 +796,7 @@ func NewAgoricApp(
upgradeName = "agoric-upgrade-12"
upgradeNameTest = "agorictest-upgrade-12"
)

app.UpgradeKeeper.SetUpgradeHandler(
upgradeName,
upgrade12Handler(app, upgradeName),
Expand Down Expand Up @@ -832,6 +833,11 @@ func upgrade12Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgr
// Record the plan to send to SwingSet
app.upgradePlan = &plan

// Reflect default BlockParams.MaxBytes change to current params
cp := app.BaseApp.GetConsensusParams(ctx)
cp.Block.MaxBytes = tmtypes.DefaultBlockParams().MaxBytes
app.BaseApp.StoreConsensusParams(ctx, cp)

// Always run module migrations
mvm, err := app.mm.RunMigrations(ctx, app.configurator, fromVm)
if err != nil {
Expand Down

0 comments on commit d4af8cc

Please sign in to comment.