Commit e307660
committed
Remove
It is usually the wallet that decides that it needs a channel, but we
want the LSP to pay the commit fees to allow the wallet user to empty
its wallet over lightning. We previously used a `please_open_channel`
message that was sent by the wallet to the LSP, but it doesn't work
well with liquidity ads.
We remove that message and instead send `open_channel` from the wallet
but with a custom channel flag that tells the LSP that they should be
paying the commit fees. This only works if the LSP adds funds on their
side of the channel, so we couple that with liquidity ads to request
funds from the LSP.
We also add a `recommended_feerates` message from the LSP which lets
the wallet know the on-chain feerates that the LSP will accept for
on-chain funding operations, since those feerates are set in the
`open_channel` message that is now sent by the wallet.please_open_channel
1 parent 319dcce commit e307660
File tree
91 files changed
+895
-842
lines changed- src
- commonMain/kotlin/fr/acinq/lightning
- blockchain/electrum
- channel
- states
- io
- json
- payment
- serialization
- v2
- v3
- v4
- transactions
- wire
- commonTest
- kotlin/fr/acinq/lightning
- blockchain/electrum
- channel
- states
- io/peer
- payment
- tests
- io/peer
- transactions
- wire
- resources/nonreg
- v2
- Closing_0ba41d17
- Closing_0ed6ff68
- Closing_0efffae3
- Closing_2fd2a3fa
- Closing_3bb07fb6
- Closing_8f1a524e
- Closing_ef682e2e
- Negotiating_c8d15808
- Negotiating_d9b4cd96
- Negotiating_ee10091c
- Negotiating_f52b19b8
- Normal_748a735b
- Normal_e2253ddd
- Normal_ff248f8d
- Normal_ff4a71b6
- Normal_ffd9f5db
- ShuttingDown_c321b947
- ShuttingDown_f89ecd50
- WaitForFundingConfirmed_f7421b49
- WaitForFundingConfirmed_fe3c5978
- WaitForFundingConfirmed_ff74dd33
- WaitForFundingLocked_f3437082
- WaitForRemotePublishFutureCommitment_ae47fde9
- WaitForRemotePublishFutureCommitment_d803549f
- v3
- Closing_029bf8f3
- Closing_0ba41d17
- Closing_0ed6ff68
- Closing_0efffae3
- Closing_ebbd24bc
- Closing_f137669f
- Negotiating_da44c6e2
- Negotiating_dabbed55
- Negotiating_fadb50c1
- Normal_fd10d3cc
- Normal_fe897b64
- Normal_ff248f8d
- Normal_ff4a71b6
- ShuttingDown_ef41a1a5
- ShuttingDown_ef7081a1
- WaitForFundingConfirmed_fe3c5978
- WaitForFundingConfirmed_ff74dd33
- WaitForFundingLocked_f3437082
- WaitForRemotePublishFutureCommitment_ae47fde9
- WaitForRemotePublishFutureCommitment_d803549f
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
91 files changed
+895
-842
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | | - | |
46 | | - | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
59 | | - | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
Lines changed: 5 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | | - | |
| 11 | + | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 37 | + | |
45 | 38 | | |
46 | 39 | | |
47 | 40 | | |
48 | | - | |
| 41 | + | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
| |||
Lines changed: 33 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
357 | | - | |
| 358 | + | |
358 | 359 | | |
359 | | - | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
| 366 | + | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
| |||
384 | 390 | | |
385 | 391 | | |
386 | 392 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
391 | 398 | | |
392 | 399 | | |
393 | 400 | | |
394 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
395 | 410 | | |
396 | 411 | | |
| 412 | + | |
397 | 413 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
402 | 421 | | |
403 | 422 | | |
0 commit comments