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

Function gossip_disable_local_channels

gossipd/gossipd.c:668–681  ·  view source on GitHub ↗

Disables all channels connected to our node. */

Source from the content-addressed store, hash-verified

666
667/* Disables all channels connected to our node. */
668static void gossip_disable_local_channels(struct daemon *daemon)
669{
670 struct node *local_node = get_node(daemon->rstate, &daemon->id);
671 struct chan_map_iter i;
672 struct chan *c;
673
674 /* We don't have a local_node, so we don't have any channels yet
675 * either */
676 if (!local_node)
677 return;
678
679 for (c = first_chan(local_node, &i); c; c = next_chan(local_node, &i))
680 local_disable_chan(daemon, c, half_chan_idx(local_node, c));
681}
682
683struct peer *random_peer(struct daemon *daemon,
684 bool (*check_peer)(const struct peer *peer))

Callers 1

gossip_initFunction · 0.85

Calls 5

first_chanFunction · 0.85
next_chanFunction · 0.85
local_disable_chanFunction · 0.85
half_chan_idxFunction · 0.85
get_nodeFunction · 0.70

Tested by

no test coverage detected