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

Function normal_gossip_start

gossipd/seeker.c:229–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static void normal_gossip_start(struct seeker *seeker, struct peer *peer)
230{
231 bool enable_stream = false;
232
233 /* Make this one of our streaming gossipers if we aren't full */
234 for (size_t i = 0; i < ARRAY_SIZE(seeker->gossiper_softref); i++) {
235 if (seeker->gossiper_softref[i] == NULL) {
236 set_softref(seeker, &seeker->gossiper_softref[i], peer);
237 enable_stream = true;
238 break;
239 }
240 }
241
242 if (enable_stream)
243 enable_gossip_stream(seeker, peer);
244 else
245 disable_gossip_stream(seeker, peer);
246}
247
248/* Turn unknown_scids map into a flat array, removes from map. */
249static struct short_channel_id *unknown_scids_remove(const tal_t *ctx,

Callers 3

peer_gossip_startupFunction · 0.85
check_firstpeerFunction · 0.85
seeker_setup_peer_gossipFunction · 0.85

Calls 2

enable_gossip_streamFunction · 0.85
disable_gossip_streamFunction · 0.85

Tested by

no test coverage detected