Skip to content

Commit

Permalink
add inline comment for why state modifications in channelClosing happ…
Browse files Browse the repository at this point in the history
…en even on dapp revert
  • Loading branch information
RnkSngh committed May 7, 2024
1 parent b8e1281 commit afe0f86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/core/Dispatcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ contract Dispatcher is OwnableUpgradeable, UUPSUpgradeable, ReentrancyGuard, IDi
)
);

// Note: We delete the portChannelMap here even on Dapp revert to avoid having a case where a dapp deployed with
// a faulty callback cannot close a channel (as is done on channelCloseInit)
delete _portChannelMap[portAddress][channelId];
if (success) {
emit ChannelCloseConfirm(portAddress, channelId);
Expand Down

0 comments on commit afe0f86

Please sign in to comment.