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

Function peer_closing_notify

lightningd/closing_control.c:307–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

closing_msgFunction · 0.85

Calls 3

tal_hexFunction · 0.85
json_notify_fmtFunction · 0.85
channel_internal_errorFunction · 0.70

Tested by

no test coverage detected