@@ -261,6 +261,12 @@ static struct command_result *found_best_peer(struct command *cmd,
261261 * for each `blinded_path` in `paths`, in order.
262262 */
263263 if (!best ) {
264+ /* Don't allow bare invoices if they explicitly told us to front */
265+ if (od -> fronting_nodes ) {
266+ return fail_invreq (cmd , ir ,
267+ "Could not find path from payment-fronting-node" );
268+ }
269+
264270 /* Note: since we don't make one, createinvoice adds a dummy. */
265271 plugin_log (cmd -> plugin , LOG_UNUSUAL ,
266272 "No incoming channel for %s, so no blinded path" ,
@@ -358,10 +364,12 @@ static struct command_result *found_best_peer(struct command *cmd,
358364static struct command_result * add_blindedpaths (struct command * cmd ,
359365 struct invreq * ir )
360366{
367+ const struct offers_data * od = get_offers_data (cmd -> plugin );
368+
361369 if (!we_want_blinded_path (cmd -> plugin , true))
362370 return create_invoicereq (cmd , ir );
363371
364- return find_best_peer (cmd , OPT_ROUTE_BLINDING , NULL ,
372+ return find_best_peer (cmd , OPT_ROUTE_BLINDING , od -> fronting_nodes ,
365373 found_best_peer , ir );
366374}
367375
0 commit comments