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

Function handle_peer_error

common/read_peer_msg.c:71–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71bool handle_peer_error(struct per_peer_state *pps,
72 const struct channel_id *channel_id,
73 const u8 *msg TAKES)
74{
75 char *err;
76 bool warning;
77 if (is_peer_error(tmpctx, msg, channel_id, &err, &warning)) {
78 /* Ignore unknown channel errors. */
79 if (!err) {
80 if (taken(msg))
81 tal_free(msg);
82 return true;
83 }
84
85 /* We hang up when a warning is received. */
86 peer_failed_received_errmsg(pps, err, channel_id, warning);
87 }
88
89 return false;
90}

Callers 3

closing_read_peer_msgFunction · 0.50
peer_inFunction · 0.50
peer_reconnectFunction · 0.50

Calls 4

is_peer_errorFunction · 0.85
takenFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected