Skip to content

Commit

Permalink
IBC-7: fix to remove state check in timeoutPacket() and `timeoutOnC…
Browse files Browse the repository at this point in the history
…lose()`

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Nov 26, 2024
1 parent 037ce6f commit 3b309dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/core/04-channel/IBCChannelPacketTimeout.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract IBCChannelPacketTimeout is IBCModuleManager, IIBCChannelPacketTimeout,

function timeoutPacket(MsgTimeoutPacket calldata msg_) external {
Channel.Data storage channel = getChannelStorage()[msg_.packet.sourcePort][msg_.packet.sourceChannel].channel;
if (channel.state != Channel.State.STATE_OPEN) {
if (channel.state == Channel.State.STATE_UNINITIALIZED_UNSPECIFIED) {
revert IBCChannelUnexpectedChannelState(channel.state);
}

Expand Down Expand Up @@ -137,7 +137,7 @@ contract IBCChannelPacketTimeout is IBCModuleManager, IIBCChannelPacketTimeout,

function timeoutOnClose(MsgTimeoutOnClose calldata msg_) external {
Channel.Data storage channel = getChannelStorage()[msg_.packet.sourcePort][msg_.packet.sourceChannel].channel;
if (channel.state != Channel.State.STATE_OPEN) {
if (channel.state == Channel.State.STATE_UNINITIALIZED_UNSPECIFIED) {
revert IBCChannelUnexpectedChannelState(channel.state);
}

Expand Down

0 comments on commit 3b309dd

Please sign in to comment.