Skip to content
Merged
Prev Previous commit
add explicit erroring
  • Loading branch information
AdityaSripal committed Mar 23, 2022
commit 0c8e7534b7073d377a871fced424636d5f2e6d8c
6 changes: 5 additions & 1 deletion spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,11 @@ function timeoutChannelUpgrade(
abortTransactionUnless(verifyChannelState(connection, proofHeight, proofChannel, currentChannel.counterpartyPortIdentifier, currentChannel.counterpartyChannelIdentifier, counterpartyChannel))

if counterpartyChannel.State == UPGRADE_INIT {

// if the counterparty is in UPGRADE_INIT and we have timed out then we should write and error receipt
// to ensure that counterparty aborts the handshake as well and returns to the original state
// write an error receipt into the error path
errorReceipt = []byte{1}
provableStore.set(errorPath(portIdentifier, channelIdentifier), errorReceipt)
}

// we must restore the channel since the timeout verification has passed
Expand Down