@@ -277,6 +277,12 @@ static struct command_result *found_best_peer(struct command *cmd,
277277 * for each `blinded_path` in `paths`, in order.
278278 */
279279 if (!best ) {
280+ /* Don't allow bare invoices if they explicitly told us to front */
281+ if (od -> fronting_nodes ) {
282+ return fail_invreq (cmd , ir ,
283+ "Could not find path from payment-fronting-node" );
284+ }
285+
280286 /* Note: since we don't make one, createinvoice adds a dummy. */
281287 plugin_log (cmd -> plugin , LOG_UNUSUAL ,
282288 "No incoming channel for %s, so no blinded path" ,
@@ -387,10 +393,12 @@ static struct command_result *found_best_peer(struct command *cmd,
387393static struct command_result * add_blindedpaths (struct command * cmd ,
388394 struct invreq * ir )
389395{
396+ const struct offers_data * od = get_offers_data (cmd -> plugin );
397+
390398 if (!we_want_blinded_path (cmd -> plugin , true))
391399 return create_invoicereq (cmd , ir );
392400
393- return find_best_peer (cmd , OPT_ROUTE_BLINDING , NULL ,
401+ return find_best_peer (cmd , OPT_ROUTE_BLINDING , od -> fronting_nodes ,
394402 found_best_peer , ir );
395403}
396404
0 commit comments