Commit 737a30c
committed
lnpeer/lnworker: refactor htlc_switch
refactor `htlc_switch` to new architecture to make it more robust
against partial settlement of htlc sets and increase maintainability.
Htlcs are now processed in two steps, first the htlcs are collected into
sets from the channels, and potentially failed on their own already.
Then a second loop iterates over the htlc sets and finalizes only on
whole sets.1 parent ae4b770 commit 737a30c
File tree
4 files changed
+752
-467
lines changed- electrum
4 files changed
+752
-467
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
| 1115 | + | |
1115 | 1116 | | |
1116 | 1117 | | |
1117 | 1118 | | |
| |||
1226 | 1227 | | |
1227 | 1228 | | |
1228 | 1229 | | |
1229 | | - | |
| 1230 | + | |
1230 | 1231 | | |
1231 | 1232 | | |
1232 | 1233 | | |
| |||
0 commit comments