This issue tracks removing the redundant SwapCompleted and the corresponding swap status. This packet has long been a formality - it is sent only after the swap is actually settled, and recently it has caused some headaches and complexity for development purposes. Furthermore setting the complete status crates an unnecessary depency on a peer cooperating and sending us this packet.
Instead, each node should consider a swap to be completed once it has received the funds from its side of the swap. At that point, all obligations related to the swap should be considered complete for that node. We can consider the existing PaymentReceived swap status to mean that a swap is complete.
Note that this introduces some potentially breaking changes on the p2p communication layer, as nodes still relying on SwapCompleted packets may experience issues.
This issue tracks removing the redundant
SwapCompleted
and the corresponding swap status. This packet has long been a formality - it is sent only after the swap is actually settled, and recently it has caused some headaches and complexity for development purposes. Furthermore setting the complete status crates an unnecessary depency on a peer cooperating and sending us this packet.Instead, each node should consider a swap to be completed once it has received the funds from its side of the swap. At that point, all obligations related to the swap should be considered complete for that node. We can consider the existing
PaymentReceived
swap status to mean that a swap is complete.Note that this introduces some potentially breaking changes on the p2p communication layer, as nodes still relying on SwapCompleted packets may experience issues.