Skip to content

Commit

Permalink
chore: remove fallback logic for GetChannel in timeout handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bznein committed Oct 21, 2024
1 parent dd675cf commit 412219d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/core/04-channel/v2/keeper/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,7 @@ func (k *Keeper) timeoutPacket(
// that the packet was indeed sent by our counterparty.
channel, ok := k.GetChannel(ctx, packet.SourceChannel)
if !ok {
// TODO: figure out how aliasing will work when more than one payload is sent.
channel, ok = k.convertV1Channel(ctx, packet.Payloads[0].SourcePort, packet.SourceChannel)
if !ok {
return errorsmod.Wrap(types.ErrChannelNotFound, packet.DestinationChannel)
}
return errorsmod.Wrap(types.ErrChannelNotFound, packet.DestinationChannel)
}
if channel.CounterpartyChannelId != packet.DestinationChannel {
return errorsmod.Wrapf(channeltypes.ErrInvalidChannelIdentifier, "counterparty channel id (%s) does not match packet destination channel id (%s)", channel.CounterpartyChannelId, packet.DestinationChannel)
Expand Down

0 comments on commit 412219d

Please sign in to comment.