Skip to content

Commit

Permalink
Merge branch '04-channel-upgrades' into jim/flush-status-packet-ack
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim authored Jun 28, 2023
2 parents 9133713 + 7f3b04d commit 2b9fa92
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 195 deletions.
4 changes: 4 additions & 0 deletions modules/core/04-channel/keeper/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ func (k Keeper) ChanUpgradeAck(
return errorsmod.Wrap(err, "failed to retrieve connection using the channel connection hops")
}

if connection.GetState() != int32(connectiontypes.OPEN) {
return errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectiontypes.State(connection.GetState()).String())
}

counterpartyHops := []string{connection.GetCounterparty().GetConnectionID()}
counterpartyChannel := types.Channel{
State: types.TRYUPGRADE,
Expand Down
Loading

0 comments on commit 2b9fa92

Please sign in to comment.