| 54 | } |
| 55 | |
| 56 | static 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) */ |
nothing calls this directly
no test coverage detected