Skip to content

Commit

Permalink
Add to docstring with explanation about channel state (#5236)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Nov 30, 2023
1 parent b3c5164 commit eaabb85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/core/04-channel/keeper/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ func (k Keeper) WriteUpgradeTryChannel(ctx sdk.Context, portID, channelID string
// This method should only be called by the IBC core msg server.
// This method will verify that the counterparty has called the ChanUpgradeTry handler.
// and that its own upgrade is compatible with the selected counterparty version.
// NOTE: the channel may be in either the OPEN or FLUSHING state.
// The channel may be in OPEN if we are in the happy path.
//
// A -> Init (OPEN), B -> Try (FLUSHING), A -> Ack (begins in OPEN)
//
// The channel may be in FLUSHING if we are in a crossing hellos situation.
//
// A -> Init (OPEN), B -> Init (OPEN) -> A -> Try (FLUSHING), B -> Try (FLUSHING), A -> Ack (begins in FLUSHING)
func (k Keeper) ChanUpgradeAck(
ctx sdk.Context,
portID,
Expand Down

0 comments on commit eaabb85

Please sign in to comment.