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

Function inject_onionmsg_reply

lightningd/onion_message.c:155–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155static void inject_onionmsg_reply(struct subd *connectd,
156 const u8 *reply,
157 const int *fds UNUSED,
158 struct command *cmd)
159{
160 char *err;
161
162 if (!fromwire_connectd_inject_onionmsg_reply(cmd, reply, &err)) {
163 log_broken(connectd->ld->log, "bad onionmsg_reply: %s",
164 tal_hex(tmpctx, reply));
165 return;
166 }
167
168 if (strlen(err) == 0)
169 was_pending(command_success(cmd, json_stream_success(cmd)));
170 else
171 was_pending(command_fail(cmd, LIGHTNINGD, "%s", err));
172}
173
174static struct command_result *json_injectonionmessage(struct command *cmd,
175 const char *buffer,

Callers

nothing calls this directly

Calls 5

tal_hexFunction · 0.85
was_pendingFunction · 0.70
command_successFunction · 0.70
json_stream_successFunction · 0.70
command_failFunction · 0.70

Tested by

no test coverage detected