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

Function hsm_msg

lightningd/hsm_control.c:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static unsigned int hsm_msg(struct subd *hsmd,
57 const u8 *msg, const int *fds UNUSED)
58{
59 /* We only expect one thing from the HSM that's not a STATUS message */
60 struct node_id client_id;
61 u8 *bad_msg;
62 char *desc;
63
64 if (!fromwire_hsmstatus_client_bad_request(tmpctx, msg, &client_id,
65 &desc, &bad_msg))
66 fatal("Bad status message from hsmd: %s", tal_hex(tmpctx, msg));
67
68 /* This should, of course, never happen. */
69 log_broken(hsmd->log, "client %s %s (request %s)",
70 fmt_node_id(tmpctx, &client_id),
71 desc, tal_hex(tmpctx, bad_msg));
72 return 0;
73}
74
75/* Is this capability supported by the HSM? (So far, always a message
76 * number) */

Callers

nothing calls this directly

Calls 4

tal_hexFunction · 0.85
fmt_node_idFunction · 0.85
fatalFunction · 0.70

Tested by

no test coverage detected