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

Function reprocess_early_cupdates

gossipd/gossmap_manage.c:1289–1307  ·  view source on GitHub ↗

No channel_announcement are early, so process every update which was for those. */

Source from the content-addressed store, hash-verified

1287
1288/* No channel_announcement are early, so process every update which was for those. */
1289static void reprocess_early_cupdates(struct gossmap_manage *gm)
1290{
1291 /* Grab current array and reset to empty */
1292 struct pending_cupdate **pcus = gm->early_cupdates;
1293
1294 gm->early_cupdates = tal_arr(gm, struct pending_cupdate *, 0);
1295
1296 for (size_t i = 0; i < tal_count(pcus); i++) {
1297 /* Is announcement now pending? Add directly to pending queue. */
1298 if (map_get(&gm->pending_ann_map, pcus[i]->scid)) {
1299 tal_arr_expand(&gm->pending_cupdates,
1300 tal_steal(gm->pending_cupdates, pcus[i]));
1301 continue;
1302 }
1303
1304 process_pending_cupdate(gm, pcus[i]);
1305 }
1306 tal_free(pcus);
1307}
1308
1309static void reprocess_queued_msgs(struct gossmap_manage *gm)
1310{

Callers 1

reprocess_queued_msgsFunction · 0.85

Calls 3

map_getFunction · 0.85
process_pending_cupdateFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected