| 206 | } |
| 207 | |
| 208 | const u8 *hsm_req(const tal_t *ctx, const u8 *req TAKES) |
| 209 | { |
| 210 | u8 *msg; |
| 211 | |
| 212 | /* hsmd goes away at shutdown. That's OK. */ |
| 213 | if (!wire_sync_write(HSM_FD, req)) |
| 214 | exit(0); |
| 215 | |
| 216 | msg = wire_sync_read(ctx, HSM_FD); |
| 217 | if (!msg) |
| 218 | exit(0); |
| 219 | |
| 220 | return msg; |
| 221 | } |
| 222 | |
| 223 | /* We're in STFU mode now: must not send messages. */ |
| 224 | static bool is_stfu_active(const struct peer *peer) |
no test coverage detected