Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update comment about channel state check in sendPacket #865

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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