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

Function peer_closing_notify

lightningd/closing_control.c:310–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310static void peer_closing_notify(struct channel *channel, const u8 *msg)
311{
312 char *message;
313 struct close_command *i;
314 enum log_level level;
315
316 if (!fromwire_closingd_notification(msg, msg, &level, &message)) {
317 channel_internal_error(channel, "Bad closing_notify %s",
318 tal_hex(msg, msg));
319 return;
320 }
321
322 list_for_each(&channel->peer->ld->close_commands, i, list) {
323 if (i->channel != channel)
324 continue;
325 json_notify_fmt(i->cmd, level, "%s", message);
326 }
327}
328
329static unsigned closing_msg(struct subd *sd, const u8 *msg, const int *fds UNUSED)
330{

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