Send peer a warning message, if non-NULL. */
| 596 | |
| 597 | /* Send peer a warning message, if non-NULL. */ |
| 598 | static 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" */ |
| 618 | static void node_announcements_not_dying(struct gossmap_manage *gm, |
no test coverage detected