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

Function peer_warning

gossipd/gossmap_manage.c:598–615  ·  view source on GitHub ↗

Send peer a warning message, if non-NULL. */

Source from the content-addressed store, hash-verified

596
597/* Send peer a warning message, if non-NULL. */
598static void peer_warning(struct gossmap_manage *gm,
599 const struct node_id *source_peer,
600 const char *fmt, ...)
601{
602 va_list ap;
603 char *formatted;
604
605 va_start(ap, fmt);
606 formatted = tal_vfmt(tmpctx, fmt, ap);
607 va_end(ap);
608
609 bad_gossip(source_peer, formatted);
610 if (!source_peer)
611 return;
612
613 queue_peer_msg(gm->daemon, source_peer,
614 take(towire_warningfmt(NULL, NULL, "%s", formatted)));
615}
616
617/* Subtle: if a new channel appears, it means those node announcements are no longer "dying" */
618static void node_announcements_not_dying(struct gossmap_manage *gm,

Callers 3

process_pending_cupdateFunction · 0.85
reprocess_queued_msgsFunction · 0.85

Calls 3

bad_gossipFunction · 0.85
queue_peer_msgFunction · 0.70
towire_warningfmtFunction · 0.50

Tested by

no test coverage detected