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

Function handle_peer_error

lightningd/subd.c:423–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423static bool handle_peer_error(struct subd *sd, const u8 *msg, int fds[1])
424{
425 void *channel = sd->channel;
426 char *desc;
427 struct peer_fd *peer_fd;
428 u8 *err_for_them;
429 bool warning;
430 bool disconnect;
431
432 if (!fromwire_status_peer_error(msg, msg,
433 &disconnect, &desc, &warning,
434 &err_for_them))
435 return false;
436
437 peer_fd = new_peer_fd_arr(msg, fds);
438
439 /* Don't free sd; we may be about to free channel. */
440 sd->channel = NULL;
441 /* While it's cleaning up, this is not a leak! */
442 notleak(sd);
443 sd->errcb(channel, peer_fd, desc, err_for_them, disconnect, warning);
444 return true;
445}
446
447static bool handle_set_billboard(struct subd *sd, const u8 *msg)
448{

Callers 1

sd_msg_readFunction · 0.85

Calls 1

new_peer_fd_arrFunction · 0.70

Tested by

no test coverage detected