@@ -650,6 +650,12 @@ static struct command_result *found_best_peer_invrequest(struct command *cmd,
650650 const struct offers_data * od = get_offers_data (cmd -> plugin );
651651
652652 if (!best ) {
653+ /* Don't allow bare invoices if they explicitly told us to front */
654+ if (od -> fronting_nodes ) {
655+ return command_fail (cmd , LIGHTNINGD ,
656+ "Could not find neighbour fronting node" );
657+ }
658+
653659 /* FIXME: Make this a warning in the result! */
654660 plugin_log (cmd -> plugin , LOG_UNUSUAL ,
655661 "No incoming channel to public peer, so no blinded path for invoice request" );
@@ -773,14 +779,12 @@ struct command_result *json_invoicerequest(struct command *cmd,
773779 * - MUST set `invreq_features`.`features` to the bitmap of features.
774780 */
775781
776- /* FIXME: We only set blinded path if private/noaddr, we should allow
777- * setting otherwise! */
778782 if (we_want_blinded_path (cmd -> plugin , false)) {
779783 struct invrequest_data * idata = tal (cmd , struct invrequest_data );
780784 idata -> invreq = invreq ;
781785 idata -> single_use = * single_use ;
782786 idata -> label = label ;
783- return find_best_peer (cmd , OPT_ONION_MESSAGES , NULL ,
787+ return find_best_peer (cmd , OPT_ONION_MESSAGES , od -> fronting_nodes ,
784788 found_best_peer_invrequest , idata );
785789 }
786790
0 commit comments