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

Function handle_peer_error_or_warning

common/read_peer_msg.c:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <common/wire_error.h>
8
9bool handle_peer_error_or_warning(struct per_peer_state *pps,
10 const u8 *msg TAKES)
11{
12 const char *err;
13
14 err = is_peer_error(tmpctx, msg);
15 if (err)
16 peer_failed_received_errmsg(pps, true, err);
17
18 /* Simply log incoming warnings */
19 err = is_peer_warning(tmpctx, msg);
20 if (err) {
21 tal_free_if_taken(msg);
22 status_info("Received %s", err);
23 return true;
24 }
25
26 return false;
27}

Callers 9

closing_read_peer_msgFunction · 0.85
splice_abortFunction · 0.85
peer_inFunction · 0.85
peer_reconnectFunction · 0.85
runFunction · 0.85
handle_peer_inFunction · 0.85
do_reconnect_danceFunction · 0.85
handle_peer_inFunction · 0.85

Calls 4

is_peer_errorFunction · 0.85
is_peer_warningFunction · 0.85
tal_free_if_takenFunction · 0.85

Tested by

no test coverage detected