| 276 | } |
| 277 | |
| 278 | static void pubkey_for_node(u64 nodeidx, struct pubkey *key, |
| 279 | const struct pubkey **node_ids) |
| 280 | { |
| 281 | struct secret seckey; |
| 282 | |
| 283 | if (nodeidx < tal_count(node_ids) && node_ids[nodeidx]) { |
| 284 | *key = *node_ids[nodeidx]; |
| 285 | return; |
| 286 | } |
| 287 | |
| 288 | memset(&seckey, 1, sizeof(seckey)); |
| 289 | memcpy(&seckey, &nodeidx, sizeof(nodeidx)); |
| 290 | if (!pubkey_from_secret(&seckey, key)) |
| 291 | abort(); |
| 292 | } |
| 293 | |
| 294 | static void write_msg_to_gstore(int outfd, const u8 *msg TAKES) |
| 295 | { |
no test coverage detected