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

Function onionmessage_forward_fail_serialize

lightningd/notification.c:160–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160static void onionmessage_forward_fail_serialize(struct json_stream *stream,
161 const struct node_id *source,
162 const u8 *incoming,
163 const struct pubkey *path_key,
164 const u8 *outgoing,
165 const struct sciddir_or_pubkey *next_node)
166{
167 json_add_node_id(stream, "source", source);
168 json_add_hex_talarr(stream, "incoming", incoming);
169 json_add_pubkey(stream, "path_key", path_key);
170 if (tal_count(outgoing) != 0) {
171 json_add_hex_talarr(stream, "outgoing", outgoing);
172 if (next_node->is_pubkey)
173 json_add_pubkey(stream, "next_node_id", &next_node->pubkey);
174 else
175 json_add_short_channel_id_dir(stream, "next_short_channel_id_dir",
176 next_node->scidd);
177 }
178}
179
180REGISTER_NOTIFICATION(onionmessage_forward_fail);
181

Callers 1

Calls 4

json_add_node_idFunction · 0.85
json_add_hex_talarrFunction · 0.85
json_add_pubkeyFunction · 0.85

Tested by

no test coverage detected