| 4458 | } |
| 4459 | |
| 4460 | static void fetch_per_commitment_point(u32 point_count, |
| 4461 | struct pubkey *commit_point) |
| 4462 | { |
| 4463 | u8 *msg; |
| 4464 | struct secret *none; |
| 4465 | |
| 4466 | wire_sync_write(HSM_FD, |
| 4467 | take(towire_hsmd_get_per_commitment_point(NULL, point_count))); |
| 4468 | msg = wire_sync_read(tmpctx, HSM_FD); |
| 4469 | if (!fromwire_hsmd_get_per_commitment_point_reply(tmpctx, msg, |
| 4470 | commit_point, |
| 4471 | &none)) |
| 4472 | status_failed(STATUS_FAIL_HSM_IO, |
| 4473 | "Bad get_per_commitment_point_reply %s", |
| 4474 | tal_hex(tmpctx, msg)); |
| 4475 | |
| 4476 | /*~ The HSM gives us the N-2'th per-commitment secret when we get the |
| 4477 | * N'th per-commitment point. But since N=0, it won't give us one. */ |
| 4478 | assert(none == NULL); |
| 4479 | } |
| 4480 | |
| 4481 | int main(int argc, char *argv[]) |
| 4482 | { |
no test coverage detected