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

Function peer_warning

gossipd/gossmap_manage.c:583–600  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

581
582/* Send peer a warning message, if non-NULL. */
583static void peer_warning(struct gossmap_manage *gm,
584 const struct node_id *source_peer,
585 const char *fmt, ...)
586{
587 va_list ap;
588 char *formatted;
589
590 va_start(ap, fmt);
591 formatted = tal_vfmt(tmpctx, fmt, ap);
592 va_end(ap);
593
594 bad_gossip(source_peer, formatted);
595 if (!source_peer)
596 return;
597
598 queue_peer_msg(gm->daemon, source_peer,
599 take(towire_warningfmt(NULL, NULL, "%s", formatted)));
600}
601
602/* Subtle: if a new channel appears, it means those node announcements are no longer "dying" */
603static void node_announcements_not_dying(struct gossmap_manage *gm,

Callers 2

process_pending_cupdateFunction · 0.85

Calls 3

bad_gossipFunction · 0.85
queue_peer_msgFunction · 0.70
towire_warningfmtFunction · 0.50

Tested by

no test coverage detected