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