Commit 135605f
committed
Rework ChannelManager::funding_transaction_signed
Previously, we'd emit a `FundingTransactionReadyForSigning` event once
the initial `commitment_signed` is exchanged for a splicing/dual-funding
attempt and require users to call back with their signed inputs using
`ChannelManager::funding_transaction_signed`. While this approach worked
in practice, it prevents us from abandoning a splice if we cannot or no
longer wish to sign as the splice has already been committed to by this
point.
This commit reworks the API such that this is now possible. After
exchanging `tx_complete`, we will no longer immediately send our initial
`commitment_signed`. We will now emit the
`FundingTransactionReadyForSigning` event and wait for the user to call
back before releasing both our initial `commitment_signed` and our
`tx_signatures`. As a result, the event is now persisted, as there is
only one possible path in which it is generated. Note that we continue
to only emit the event if a local contribution to negotiated transaction
was made.
Future work will expose a cancellation API such that we can abandon
splice attempts safely (we can just force close the channel with
dual-funding).1 parent de384ff commit 135605f
File tree
5 files changed
+459
-474
lines changed- lightning/src
- events
- ln
5 files changed
+459
-474
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1835 | 1835 | | |
1836 | 1836 | | |
1837 | 1837 | | |
1838 | | - | |
| 1838 | + | |
1839 | 1839 | | |
1840 | 1840 | | |
1841 | 1841 | | |
| |||
2304 | 2304 | | |
2305 | 2305 | | |
2306 | 2306 | | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2311 | 2320 | | |
2312 | 2321 | | |
2313 | 2322 | | |
| |||
2930 | 2939 | | |
2931 | 2940 | | |
2932 | 2941 | | |
2933 | | - | |
2934 | | - | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
| 2959 | + | |
2935 | 2960 | | |
2936 | 2961 | | |
2937 | 2962 | | |
| |||
0 commit comments