mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
lightningd: centralize refcounting behaviour for peers.
It's mildly neater this way. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -586,9 +586,7 @@ static void destroy_uncommitted_channel(struct uncommitted_channel *uc)
|
||||
|
||||
uc->peer->uncommitted_channel = NULL;
|
||||
|
||||
/* Last one out frees */
|
||||
if (list_empty(&uc->peer->channels))
|
||||
delete_peer(uc->peer);
|
||||
maybe_delete_peer(uc->peer);
|
||||
}
|
||||
|
||||
/* Returns NULL if there's already an opening or active channel for this peer */
|
||||
|
||||
Reference in New Issue
Block a user