@@ -647,6 +647,12 @@ static struct command_result *found_best_peer_invrequest(struct command *cmd,
647647 const struct offers_data * od = get_offers_data (cmd -> plugin );
648648
649649 if (!best ) {
650+ /* Don't allow bare invoices if they explicitly told us to front */
651+ if (od -> fronting_nodes ) {
652+ return command_fail (cmd , LIGHTNINGD ,
653+ "Could not find neighbour fronting node" );
654+ }
655+
650656 /* FIXME: Make this a warning in the result! */
651657 plugin_log (cmd -> plugin , LOG_UNUSUAL ,
652658 "No incoming channel to public peer, so no blinded path for invoice request" );
@@ -770,14 +776,12 @@ struct command_result *json_invoicerequest(struct command *cmd,
770776 * - MUST set `invreq_features`.`features` to the bitmap of features.
771777 */
772778
773- /* FIXME: We only set blinded path if private/noaddr, we should allow
774- * setting otherwise! */
775779 if (we_want_blinded_path (cmd -> plugin , false)) {
776780 struct invrequest_data * idata = tal (cmd , struct invrequest_data );
777781 idata -> invreq = invreq ;
778782 idata -> single_use = * single_use ;
779783 idata -> label = label ;
780- return find_best_peer (cmd , OPT_ONION_MESSAGES , NULL ,
784+ return find_best_peer (cmd , OPT_ONION_MESSAGES , od -> fronting_nodes ,
781785 found_best_peer_invrequest , idata );
782786 }
783787
0 commit comments