Skip to content

Commit

Permalink
ensure packet timeout is set
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Apr 29, 2024
1 parent 60ba653 commit 16666c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ibc-core/ics04-channel/src/handler/send_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ pub fn send_packet_validate(
ctx_a: &impl SendPacketValidationContext,
packet: &Packet,
) -> Result<(), ContextError> {
if !packet.timeout_height_on_b.is_set() && !packet.timeout_timestamp_on_b.is_set() {
return Err(ContextError::PacketError(PacketError::MissingTimeout));
}

let chan_end_path_on_a = ChannelEndPath::new(&packet.port_id_on_a, &packet.chan_id_on_a);
let chan_end_on_a = ctx_a.channel_end(&chan_end_path_on_a)?;

Expand Down

0 comments on commit 16666c2

Please sign in to comment.