-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
htlcswitch: handle nil circuit properly when settling
We have two sources which can call `handlePacketSettle`, either through the link's `<-s.htlcPlex`, or the `<-s.resolutionMsgs`, which means the `closeCircuit` could be call twice. Previously we already caught this case inside `closeCircuit`, in that we would return a nil circuit upon seeing `ErrUnknownCircuit`, indicating the circuit was removed. However, we still need to account the case when the circuit is the process of being closed, which is now fixed as we will ignore when seeing `ErrCircuitClosing`.
- Loading branch information
1 parent
bb9c680
commit 944f162
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters