mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-29 20:04:34 +01:00
A channel can be closed before it locks in. This lets dualopend handle shutdown messages from the peer before the channel is locked in.
6.4 KiB
6.4 KiB
| 1 | #include <bitcoin/chainparams.h> |
|---|---|
| 2 | #include <bitcoin/psbt.h> |
| 3 | #include <common/cryptomsg.h> |
| 4 | #include <common/channel_config.h> |
| 5 | #include <common/channel_id.h> |
| 6 | #include <common/derive_basepoints.h> |
| 7 | #include <common/features.h> |
| 8 | #include <common/penalty_base.h> |
| 9 | #include <common/per_peer_state.h> |
| 10 | # Which network are we configured for? |
| 11 | # Base configuration we'll offer |
| 12 | # Minimum/maximum configuration values we'll accept |
| 13 | # Constraints in case the other end tries to open a channel. |
| 14 | # Optional msg to send. |
| 15 | # master->dualopend: reply back with our first funding info/contribs |
| 16 | # dualopend->master: ready to commit channel open to database and |
| 17 | # get some signatures for the funding_tx. |
| 18 | # dualopend->master: peer updated the psbt |
| 19 | # master->dualopend: we updated the psbt |
| 20 | # master->dualopend: fail this channel open |
| 21 | # dualopend->master: we failed to negotiate channel |
| 22 | # dualopend->master received tx_sigs from peer |
| 23 | # master->dualopend send our tx_sigs to peer |
| 24 | # dualopend->master tx sigs transmitted to peer |
| 25 | # dualopend->master this channel has been locked |
| 26 | # master->dualopend funding reached depth; tell peer |
| 27 | # Tell peer to shut down channel. |
| 28 | # Peer told us that channel is shutting down |
| 29 | # master -> dualopend: do you have a memleak? |