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

Function update_gossip

plugins/renepay/routefail.c:153–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static struct command_result *update_gossip(struct routefail *r)
154{
155 /* if there is no raw_message we continue */
156 if (!r->route->result->raw_message)
157 goto skip_update_gossip;
158
159 const u8 *update = channel_update_from_onion_error(
160 tmpctx, r->route->result->raw_message);
161
162 if (!update)
163 goto skip_update_gossip;
164
165 struct out_req *req =
166 jsonrpc_request_start(r->cmd, "addgossip",
167 update_gossip_done, update_gossip_failure, r);
168 json_add_hex_talarr(req->js, "message", update);
169 return send_outreq(req);
170
171skip_update_gossip:
172 return handle_failure(r);
173}
174
175/*****************************************************************************
176 * handle_cases

Callers 1

routefail_startFunction · 0.85

Calls 4

json_add_hex_talarrFunction · 0.85
handle_failureFunction · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected