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

Function handle_peer_error

lightningd/subd.c:420–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420static bool handle_peer_error(struct subd *sd, const u8 *msg, int fds[1])
421{
422 void *channel = sd->channel;
423 struct channel_id channel_id;
424 char *desc;
425 struct peer_fd *peer_fd;
426 u8 *err_for_them;
427 bool warning;
428
429 if (!fromwire_status_peer_error(msg, msg,
430 &channel_id, &desc, &warning,
431 &err_for_them))
432 return false;
433
434 peer_fd = new_peer_fd_arr(msg, fds);
435
436 /* Don't free sd; we may be about to free channel. */
437 sd->channel = NULL;
438 sd->errcb(channel, peer_fd, &channel_id, desc, warning, err_for_them);
439 return true;
440}
441
442static bool handle_set_billboard(struct subd *sd, const u8 *msg)
443{

Callers 4

sd_msg_readFunction · 0.70
handle_peer_inFunction · 0.50
do_reconnect_danceFunction · 0.50
handle_peer_inFunction · 0.50

Calls 2

new_peer_fd_arrFunction · 0.70

Tested by

no test coverage detected