Skip to content

Commit

Permalink
Merge branch '04-channel-upgrades' into damian/cian/refactor-app-cb-args
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Aug 16, 2023
2 parents f434996 + 7cd3ddf commit 60ca446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/04-channel/keeper/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (k Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID strin
k.SetChannel(ctx, portID, channelID, channel)
k.SetUpgrade(ctx, portID, channelID, upgrade)

k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "state", channel.State.String(), "upgrade-sequence", fmt.Sprintf("%d", channel.UpgradeSequence))
k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "state", channel.State, "upgrade-sequence", fmt.Sprintf("%d", channel.UpgradeSequence))

emitChannelUpgradeInitEvent(ctx, portID, channelID, channel, upgrade)
return channel
Expand All @@ -80,7 +80,7 @@ func (k Keeper) ChanUpgradeTry(
return types.Upgrade{}, errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID)
}

if channel.State != types.OPEN {
if !channel.IsOpen() {
return types.Upgrade{}, errorsmod.Wrapf(types.ErrInvalidChannelState, "expected %s, got %s", types.OPEN, channel.State)
}

Expand Down

0 comments on commit 60ca446

Please sign in to comment.