mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
wallet: Add a final CLOSED state to channels
Instead of deleting the channels we will simple mark them as `CLOSED` from now on. This is needed for some of the other tables not to end up with dangling references that would otherwise survive the channel lifetime, e.g., forwards and transactions. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
7046d0220c
commit
1dbdc74bc3
@@ -842,7 +842,10 @@ peer_connected_hook_cb(struct peer_connected_hook_payload *payload,
|
||||
case ONCHAIN:
|
||||
case FUNDING_SPEND_SEEN:
|
||||
case CLOSINGD_COMPLETE:
|
||||
/* Channel is supposed to be active! */
|
||||
/* Channel is supposed to be active!*/
|
||||
abort();
|
||||
case CLOSED:
|
||||
/* Channel should not have been loaded */
|
||||
abort();
|
||||
|
||||
/* We consider this "active" but we only send an error */
|
||||
|
||||
Reference in New Issue
Block a user