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

Function node_has_public_channels

gossipd/routing.c:392–402  ·  view source on GitHub ↗

We've received a channel_announce for a channel attached to this node: * otherwise it's in the map only because it's a peer, or us. */

Source from the content-addressed store, hash-verified

390/* We've received a channel_announce for a channel attached to this node:
391 * otherwise it's in the map only because it's a peer, or us. */
392static bool node_has_public_channels(struct node *node)
393{
394 struct chan_map_iter i;
395 struct chan *c;
396
397 for (c = first_chan(node, &i); c; c = next_chan(node, &i)) {
398 if (is_chan_public(c))
399 return true;
400 }
401 return false;
402}
403
404/* We can *send* a channel_announce for a channel attached to this node:
405 * we only send once we have a channel_update. */

Callers 1

catch_node_announcementFunction · 0.85

Calls 3

first_chanFunction · 0.85
next_chanFunction · 0.85
is_chan_publicFunction · 0.85

Tested by

no test coverage detected