MCPcopy Create free account
hub / github.com/ElementsProject/lightning / destroy_uncommitted_channel

Function destroy_uncommitted_channel

lightningd/opening_common.c:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <lightningd/subd.h>
10
11static void destroy_uncommitted_channel(struct uncommitted_channel *uc)
12{
13 struct subd *open_daemon = uc->open_daemon;
14
15 if (open_daemon) {
16 uc->open_daemon = NULL;
17 subd_release_channel(open_daemon, uc);
18 }
19
20 /* This is how shutdown_subdaemons tells us not to delete from db! */
21 if (!uc->peer->uncommitted_channel)
22 return;
23
24 uc->peer->uncommitted_channel = NULL;
25
26 maybe_delete_peer(uc->peer);
27}
28
29struct uncommitted_channel *
30new_uncommitted_channel(struct peer *peer)

Callers

nothing calls this directly

Calls 2

maybe_delete_peerFunction · 0.85
subd_release_channelFunction · 0.70

Tested by

no test coverage detected