| 222 | } |
| 223 | |
| 224 | static struct blinded_path *blinded_path_dup(const tal_t *ctx, |
| 225 | const struct blinded_path *old) |
| 226 | { |
| 227 | struct blinded_path *bp = tal(ctx, struct blinded_path); |
| 228 | *bp = *old; |
| 229 | bp->path = tal_arr(bp, struct blinded_path_hop *, tal_count(old->path)); |
| 230 | for (size_t i = 0; i < tal_count(bp->path); i++) { |
| 231 | bp->path[i] = tal(bp->path, struct blinded_path_hop); |
| 232 | bp->path[i]->blinded_node_id = old->path[i]->blinded_node_id; |
| 233 | bp->path[i]->encrypted_recipient_data = tal_dup_talarr(bp->path[i], u8, |
| 234 | old->path[i]->encrypted_recipient_data); |
| 235 | } |
| 236 | return bp; |
| 237 | } |
| 238 | |
| 239 | struct command_result * |
| 240 | send_onion_reply(struct command *cmd, |