Skip to content

Commit

Permalink
fix: update comment about channel state check in sendPacket (cosmos…
Browse files Browse the repository at this point in the history
…#865)

* update comment

* typo

* remove comment

Co-authored-by: Carlos Rodriguez <[email protected]>
  • Loading branch information
2 people authored and dshiell committed Dec 16, 2022
1 parent 10bb6d4 commit a2a99eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/core/ics-004-channel-and-packet-semantics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Calling modules MUST execute application logic atomically in conjunction with ca

The IBC handler performs the following steps in order:

- Checks that the channel & connection are open to send packets
- Checks that the channel is not closed to send packets
- Checks that the calling module owns the sending port (see [ICS 5](../ics-005-port-allocation))
- Checks that the timeout height specified has not already passed on the destination chain
- Increments the send sequence counter associated with the channel
Expand All @@ -551,8 +551,7 @@ function sendPacket(
data: bytes) {
channel = provableStore.get(channelPath(sourcePort, sourceChannel))

// check that the channel & connection are open to send packets;
// note: optimistic sends are permitted once the handshake has started
// check that the channel is not closed to send packets;
abortTransactionUnless(channel !== null)
abortTransactionUnless(channel.state !== CLOSED)
connection = provableStore.get(connectionPath(channel.connectionHops[0]))
Expand Down

0 comments on commit a2a99eb

Please sign in to comment.