| 303 | } |
| 304 | |
| 305 | static struct command_result *found_best_peer(struct command *cmd, |
| 306 | const struct chaninfo *best, |
| 307 | struct offer_info *offinfo) |
| 308 | { |
| 309 | const struct offers_data *od = get_offers_data(cmd->plugin); |
| 310 | |
| 311 | /* BOLT #12: |
| 312 | * - if it is connected only by private channels: |
| 313 | * - MUST include `offer_paths` containing one or more paths to the node from |
| 314 | * publicly reachable nodes. |
| 315 | */ |
| 316 | if (!best) { |
| 317 | /* FIXME: Make this a warning in the result! */ |
| 318 | plugin_log(cmd->plugin, LOG_UNUSUAL, |
| 319 | "No incoming channel to public peer, so no blinded path"); |
| 320 | } else { |
| 321 | offinfo->offer->offer_paths |
| 322 | = offer_onehop_path(offinfo->offer, od, |
| 323 | offinfo->offer, &best->id); |
| 324 | } |
| 325 | |
| 326 | return create_offer(cmd, offinfo); |
| 327 | } |
| 328 | |
| 329 | static struct command_result *maybe_add_path(struct command *cmd, |
| 330 | struct offer_info *offinfo) |
nothing calls this directly
no test coverage detected