@@ -261,6 +261,12 @@ static struct command_result *found_best_peer(struct command *cmd,
261
261
* for each `blinded_path` in `paths`, in order.
262
262
*/
263
263
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
+
264
270
/* Note: since we don't make one, createinvoice adds a dummy. */
265
271
plugin_log (cmd -> plugin , LOG_UNUSUAL ,
266
272
"No incoming channel for %s, so no blinded path" ,
@@ -358,10 +364,12 @@ static struct command_result *found_best_peer(struct command *cmd,
358
364
static struct command_result * add_blindedpaths (struct command * cmd ,
359
365
struct invreq * ir )
360
366
{
367
+ const struct offers_data * od = get_offers_data (cmd -> plugin );
368
+
361
369
if (!we_want_blinded_path (cmd -> plugin , true))
362
370
return create_invoicereq (cmd , ir );
363
371
364
- return find_best_peer (cmd , OPT_ROUTE_BLINDING , NULL ,
372
+ return find_best_peer (cmd , OPT_ROUTE_BLINDING , od -> fronting_nodes ,
365
373
found_best_peer , ir );
366
374
}
367
375
0 commit comments