mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
df: rework closing logic
Trying to put all the disconnect logic into the same path was a dumb idea. If you asked to reconnect but passed in an 'unsaved' channel, we would not call the 'reconnect' code. Instead, we make a differentiation between "unsaved" channels (ones that we haven't received commitment tx for) and handle the disconnect for these separate from where we want to do a reconnect.
This commit is contained in:
@@ -20,11 +20,8 @@ void dualopen_tell_depth(struct subd *dualopend,
|
||||
const struct bitcoin_txid *txid,
|
||||
u32 depth);
|
||||
|
||||
void channel_close_conn(struct channel *channel,
|
||||
const char *why);
|
||||
|
||||
void channel_close_reconn(struct channel *channel,
|
||||
const char *why);
|
||||
/* Close connection to an unsaved channel */
|
||||
void channel_unsaved_close_conn(struct channel *channel, const char *why);
|
||||
|
||||
void json_add_unsaved_channel(struct json_stream *response,
|
||||
const struct channel *channel);
|
||||
|
||||
Reference in New Issue
Block a user