diff --git a/spec/core/ics-004-channel-and-packet-semantics/README.md b/spec/core/ics-004-channel-and-packet-semantics/README.md index 1590d51c4..eb68d4db5 100644 --- a/spec/core/ics-004-channel-and-packet-semantics/README.md +++ b/spec/core/ics-004-channel-and-packet-semantics/README.md @@ -895,15 +895,16 @@ function recvPacket( // for ORDERED_ALLOW_TIMEOUT, we do not abort on timeout // instead increment next sequence recv and write the sentinel timeout value in packet receipt // then return - if (getConsensusHeight() >= packet.timeoutHeight && packet.timeoutHeight != 0) || (currentTimestamp() >= packet.timeoutTimestamp && packet.timeoutTimestamp != 0) { + if ((getConsensusHeight() >= packet.timeoutHeight && packet.timeoutHeight != 0) || (currentTimestamp() >= packet.timeoutTimestamp && packet.timeoutTimestamp != 0)) { nextSequenceRecv = nextSequenceRecv + 1 provableStore.set(nextSequenceRecvPath(packet.destPort, packet.destChannel), nextSequenceRecv) provableStore.set( packetReceiptPath(packet.destPort, packet.destChannel, packet.sequence), TIMEOUT_RECEIPT ) + return; } - return; + break; default: // unsupported channel type @@ -921,6 +922,9 @@ function recvPacket( switch channel.order { case ORDERED: + nextSequenceRecv = nextSequenceRecv + 1 + provableStore.set(nextSequenceRecvPath(packet.destPort, packet.destChannel), nextSequenceRecv) + break; case ORDERED_ALLOW_TIMEOUT: nextSequenceRecv = nextSequenceRecv + 1 provableStore.set(nextSequenceRecvPath(packet.destPort, packet.destChannel), nextSequenceRecv)