Skip to content

Commit

Permalink
test: force enable mirror channel after LaunchBscUpgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Dec 5, 2023
1 parent 09b52c7 commit bc293f3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,24 @@ func (app *BNBBeaconChain) initBridge() {
app.scKeeper.SetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.BindChannelID, sdk.ChannelAllow)
app.scKeeper.SetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.TransferOutChannelID, sdk.ChannelAllow)
app.scKeeper.SetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.TransferInChannelID, sdk.ChannelAllow)

// TODO: only for dev testing
if app.scKeeper.GetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorChannelID) != sdk.ChannelAllow {
_, err := app.scKeeper.SaveChannelSettingChangeToIbc(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorChannelID, sdk.ChannelAllow)
if err != nil {
app.Logger.Error("initBridge MirrorChannelID", "SaveChannelSettingChangeToIbc", err)
}
app.scKeeper.SetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorChannelID, sdk.ChannelAllow)
}
if app.scKeeper.GetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorSyncChannelID) != sdk.ChannelAllow {
_, err := app.scKeeper.SaveChannelSettingChangeToIbc(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorSyncChannelID, sdk.ChannelAllow)
if err != nil {
app.Logger.Error("initBridge MirrorSyncChannelID", "SaveChannelSettingChangeToIbc", err)
}
app.scKeeper.SetChannelSendPermission(ctx, sdk.ChainID(ServerContext.BscIbcChainId), bTypes.MirrorSyncChannelID, sdk.ChannelAllow)
}
})

}

func (app *BNBBeaconChain) initParamHub() {
Expand Down

0 comments on commit bc293f3

Please sign in to comment.