Skip to content

Commit

Permalink
Merge branch 'releases/v2.x' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
anilcse authored Oct 16, 2023
2 parents 4d5813b + 1cdb42d commit b7cb32c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ func (app *PassageApp) Name() string { return app.BaseApp.Name() }

// BeginBlocker application updates every begin block
func (app *PassageApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock {
BeginBlockFork(ctx, app)
return app.mm.BeginBlock(ctx, req)
}

Expand Down
19 changes: 19 additions & 0 deletions app/forks.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package app

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
)

const forkHeight = 4426144

// BeginBlockFork updates, the IBC Transfer module's SendEnabled and ReceiveEnabled parameters are set to true.
func BeginBlockFork(ctx sdk.Context, app *PassageApp) {
if ctx.BlockHeight() == forkHeight {
ctx.Logger().Info("Applying Passage v2.1 upgrade. Enabling IBC transfers")
app.TransferKeeper.SetParams(ctx, types.Params{
SendEnabled: true,
ReceiveEnabled: true,
})
}
}

0 comments on commit b7cb32c

Please sign in to comment.