update ChannelKeeper for ibc v3

This commit is contained in:
vuong
2022-03-22 03:47:04 +07:00
committed by Ethan Frey
parent 97e067e006
commit f5bba58741
2 changed files with 2 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ func (i IBCHandler) OnChanOpenAck(
return sdkerrors.Wrapf(channeltypes.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID)
}
channelInfo.Counterparty.ChannelId = counterpartyChannelID
i.channelKeeper.SetChannel(ctx, portID, channelID, channelInfo)
msg := wasmvmtypes.IBCChannelConnectMsg{
OpenAck: &wasmvmtypes.IBCOpenAck{
Channel: toWasmVMChannel(portID, channelID, channelInfo),

View File

@@ -75,6 +75,7 @@ type ChannelKeeper interface {
ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error
GetAllChannels(ctx sdk.Context) (channels []channeltypes.IdentifiedChannel)
IterateChannels(ctx sdk.Context, cb func(channeltypes.IdentifiedChannel) bool)
SetChannel(ctx sdk.Context, portID, channelID string, channel channeltypes.Channel)
}
// ClientKeeper defines the expected IBC client keeper