mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-24 06:47:46 +01:00
We must store the channel state after sending our `tx_signatures`, because our peer may broadcast the transaction at that point. But it's useful to store it earlier than that, to allow resuming the signatures exchange if we get disconnected, otherwise we could end up in a state where one peer has forgotten the channel while the other has sent `tx_signatures` and must thus wait for the channel to be spent or double-spent. With that change, we can cleanly handle any disconnection: - if we get disconnected before any peer sent `commitment_signed`, the channel is forgotten by both peers - if we get disconnected after one peer send `commitment_signed` but the other peer didn't, the channel will be forgotten when reconnecting (this is safe because the peer that sent `commitment_signed` did *not* send `tx_signatures` since the other peer didn't send `commitment_signed`) - if we get disconnected after both peers sent `commitment_signed`, we simply resume the signatures exchange on reconnection We introduce a new TLV field to `channel_reestablish` that contains the `txid` of the funding transaction that is partially signed: this lets peers figure out which messages to send back on reconnection. |
||
---|---|---|
.. | ||
src | ||
eclair-cli | ||
pom.xml |