mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
879d1191e8
The ability to stfu channels in bulk is required to do complex multi channel operations. When stfu’ing in this manner, the available funds at the moment of stfu is returned to the user. In order to cancel the stfu we also add a bulk tx_abort command. Changelog-Added: `stfu_channels` and `abort_channels` are added for bulk multi-channel splice commands. These allow the user to pause (and resume) multiple channels in place.
15 KiB
15 KiB
1 | #include <bitcoin/psbt.h> |
---|---|
2 | #include <bitcoin/tx.h> |
3 | #include <channeld/inflight.h> |
4 | #include <common/bip32.h> |
5 | #include <common/blockheight_states.h> |
6 | #include <common/cryptomsg.h> |
7 | #include <common/channel_config.h> |
8 | #include <common/channel_id.h> |
9 | #include <common/channel_type.h> |
10 | #include <common/derive_basepoints.h> |
11 | #include <common/features.h> |
12 | #include <common/fee_states.h> |
13 | #include <wire/peer_wire.h> |
14 | # Begin! (passes gossipd-client fd) |
15 | # channeld->lightningd: successfully negotated reestablishment. |
16 | # master->channeld funding hit new depth(funding locked if >= lock depth) |
17 | # short_channel_id != NULL once we have 3+ confirmations |
18 | # Tell channel to offer this htlc |
19 | # Reply; synchronous since IDs have to increment. |
20 | # Empty failure message means success. |
21 | # Main daemon found out the preimage for an HTLC |
22 | #include <bitcoin/preimage.h> |
23 | # Main daemon says HTLC failed |
24 | # When we receive channel_ready. |
25 | # When we receive funding_locked. |
26 | #include <common/penalty_base.h> |
27 | # lightningd needs to track our anchor outputs on remote txs. |
28 | # RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs. |
29 | # RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs. |
30 | # Inflight splice commitments |
31 | #include <common/htlc_wire.h> |
32 | #include <wally_bip32.h> |
33 | # master->channeld: Update an active splice |
34 | # channeld->master: Splice update complete |
35 | # channeld->master: Lookup a transaction |
36 | # master->channeld: Retrieved transaction |
37 | # master->channeld: User has signed psbt and it's ready to complete |
38 | # channeld->master: Signed psbt is completed |
39 | # channeld->master: Splice signatures are about to be sent |
40 | # channeld->master: A feerate error has occured |
41 | # channeld->master: Add an inflight to the DB |
42 | # master->channeld: Inflight saved successfully |
43 | # channeld->master: Update inflight with sigs |
44 | # channeld->master: A funding error has occured |
45 | # channeld->master: A splice state error has occured |
46 | # channeld->master: Peer rejected our splice |
47 | # master->channeld: Please enter stfu mode |
48 | # channeld->master: Entered stfu result |
49 | # master->channeld: Please enter perform tx_abort |
50 | # Tell peer to shut down channel. |
51 | # Peer told us that channel is shutting down |
52 | # Re-enable commit timer. |
53 | # master -> channeld: do you have a memleak? |
54 | # Peer presented proof it was from the future. |
55 | # When we receive announcement_signatures for channel announce |
56 | # Ask channeld to send a error message. Used in forgetting channel case. |
57 | # Tell master channeld has sent the error message. |
58 | # Ask channeld to quiesce. |
59 | # Tell master we're upgrading the commitment tx. |
60 | # Tell peer about our latest and greatest blockheight. |
61 | # Tell channeld about peer's shachain seed. |