| 132 | } |
| 133 | |
| 134 | struct blinded_path *incoming_message_blinded_path(const tal_t *ctx, |
| 135 | const struct pubkey *ids, |
| 136 | const struct short_channel_id **scids, |
| 137 | const struct secret *path_secret) |
| 138 | { |
| 139 | struct tlv_encrypted_data_tlv **etlvs; |
| 140 | size_t nhops = tal_count(ids); |
| 141 | |
| 142 | assert(nhops > 0); |
| 143 | etlvs = new_encdata_tlvs(tmpctx, ids, scids); |
| 144 | |
| 145 | /* Put path_secret into final hop (us) */ |
| 146 | etlvs[nhops-1]->path_id = tal_dup_arr(etlvs[nhops-1], u8, |
| 147 | path_secret->data, |
| 148 | ARRAY_SIZE(path_secret->data), 0); |
| 149 | |
| 150 | return blinded_path_from_encdata_tlvs(ctx, |
| 151 | cast_const2(const struct tlv_encrypted_data_tlv **, etlvs), |
| 152 | ids); |
| 153 | } |
| 154 | |
| 155 | static void extend_blinded_path(struct blinded_path *bpath, |
| 156 | const struct blinded_path_hop *hop) |
no test coverage detected