Commit a622488
committed
Add liquidity ads to the channel opening flow
We previously only used liquidity ads with splicing: we now support it
during the initial channel opening flow as well. This lets us add more
unit tests, including tests for the case where the node receiving the
`open_channel` message is responsible for paying the commitment fees.
We also update liquidity ads to use the latest version of the spec from
lightning/bolts#1153. This introduces more ways
of paying the liquidity fees, to support on-the-fly funding without
existing channel balance (not implemented in this commit).
Note that we need some backwards-compatibility with the previous
liquidity ads types in our state serialization code: when we're in the
middle of signing a splice transaction, we may have a legacy liquidity
lease in our splice status. We ignore it when finalizing the splice: the
only consequence is that we won't store an entry in our DB for that
lease, but the channel will otherwise work correctly.1 parent a27ec08 commit a622488
File tree
50 files changed
+1051
-471
lines changed- src
- commonMain/kotlin/fr/acinq/lightning
- channel
- states
- io
- json
- serialization
- v2
- v3
- v4
- wire
- commonTest
- kotlin/fr/acinq/lightning
- channel
- states
- crypto
- io/peer
- payment
- serialization
- tests
- wire
- resources/nonreg
- v2
- Normal_748a735b
- Normal_e2253ddd
- Normal_ff248f8d
- Normal_ff4a71b6
- Normal_ffd9f5db
- v3
- Normal_fd10d3cc
- Normal_fe897b64
- Normal_ff248f8d
- Normal_ff4a71b6
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+1051
-471
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
677 | | - | |
| 676 | + | |
678 | 677 | | |
679 | 678 | | |
680 | 679 | | |
| |||
987 | 986 | | |
988 | 987 | | |
989 | 988 | | |
990 | | - | |
991 | 989 | | |
992 | 990 | | |
993 | 991 | | |
| |||
1075 | 1073 | | |
1076 | 1074 | | |
1077 | 1075 | | |
1078 | | - | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1079 | 1085 | | |
1080 | 1086 | | |
1081 | 1087 | | |
| |||
1120 | 1126 | | |
1121 | 1127 | | |
1122 | 1128 | | |
1123 | | - | |
| 1129 | + | |
1124 | 1130 | | |
1125 | 1131 | | |
1126 | 1132 | | |
| |||
1168 | 1174 | | |
1169 | 1175 | | |
1170 | 1176 | | |
1171 | | - | |
| 1177 | + | |
1172 | 1178 | | |
1173 | 1179 | | |
1174 | 1180 | | |
| |||
1181 | 1187 | | |
1182 | 1188 | | |
1183 | 1189 | | |
1184 | | - | |
| 1190 | + | |
1185 | 1191 | | |
1186 | 1192 | | |
1187 | 1193 | | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
179 | 178 | | |
180 | 179 | | |
181 | 180 | | |
182 | | - | |
| 181 | + | |
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
| |||
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
409 | | - | |
410 | | - | |
| 408 | + | |
| 409 | + | |
411 | 410 | | |
412 | 411 | | |
413 | 412 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
| 421 | + | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
| |||
642 | 641 | | |
643 | 642 | | |
644 | 643 | | |
645 | | - | |
| 644 | + | |
646 | 645 | | |
647 | 646 | | |
648 | 647 | | |
| |||
674 | 673 | | |
675 | 674 | | |
676 | 675 | | |
677 | | - | |
| 676 | + | |
678 | 677 | | |
679 | 678 | | |
680 | 679 | | |
| |||
840 | 839 | | |
841 | 840 | | |
842 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
843 | 854 | | |
844 | 855 | | |
845 | 856 | | |
| |||
851 | 862 | | |
852 | 863 | | |
853 | 864 | | |
854 | | - | |
| 865 | + | |
855 | 866 | | |
856 | 867 | | |
857 | 868 | | |
| |||
0 commit comments