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

Function peer_enable_channels

gossipd/gossipd.c:61–73  ·  view source on GitHub ↗

~ This cancels the soft-disables when the peer reconnects. */

Source from the content-addressed store, hash-verified

59
60/*~ This cancels the soft-disables when the peer reconnects. */
61static void peer_enable_channels(struct daemon *daemon, const struct node *node)
62{
63 /* If this peer had a channel with us, mark it disabled. */
64 struct chan_map_iter i;
65 const struct chan *c;
66
67 for (c = first_chan(node, &i); c; c = next_chan(node, &i)) {
68 int direction;
69 if (!local_direction(daemon->rstate, c, &direction))
70 continue;
71 local_enable_chan(daemon, c, direction);
72 }
73}
74
75/*~ Destroy a peer, usually because the per-peer daemon has exited.
76 *

Callers 1

connectd_new_peerFunction · 0.85

Calls 4

first_chanFunction · 0.85
next_chanFunction · 0.85
local_directionFunction · 0.85
local_enable_chanFunction · 0.85

Tested by

no test coverage detected