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

Function peer_closing_notify

lightningd/closing_control.c:470–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470static void peer_closing_notify(struct channel *channel, const u8 *msg)
471{
472 char *message;
473 struct close_command *i;
474 enum log_level level;
475
476 if (!fromwire_closingd_notification(msg, msg, &level, &message)) {
477 channel_internal_error(channel, "Bad closing_notify %s",
478 tal_hex(msg, msg));
479 return;
480 }
481
482 list_for_each(&channel->peer->ld->close_commands, i, list) {
483 if (i->channel != channel)
484 continue;
485 json_notify_fmt(i->cmd, level, "%s", message);
486 }
487}
488
489static unsigned closing_msg(struct subd *sd, const u8 *msg, const int *fds UNUSED)
490{

Callers 1

closing_msgFunction · 0.85

Calls 3

tal_hexFunction · 0.85
channel_internal_errorFunction · 0.70
json_notify_fmtFunction · 0.70

Tested by

no test coverage detected