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