@@ -650,6 +650,12 @@ static struct command_result *found_best_peer_invrequest(struct command *cmd,
650
650
const struct offers_data * od = get_offers_data (cmd -> plugin );
651
651
652
652
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
+
653
659
/* FIXME: Make this a warning in the result! */
654
660
plugin_log (cmd -> plugin , LOG_UNUSUAL ,
655
661
"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,
773
779
* - MUST set `invreq_features`.`features` to the bitmap of features.
774
780
*/
775
781
776
- /* FIXME: We only set blinded path if private/noaddr, we should allow
777
- * setting otherwise! */
778
782
if (we_want_blinded_path (cmd -> plugin , false)) {
779
783
struct invrequest_data * idata = tal (cmd , struct invrequest_data );
780
784
idata -> invreq = invreq ;
781
785
idata -> single_use = * single_use ;
782
786
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 ,
784
788
found_best_peer_invrequest , idata );
785
789
}
786
790
0 commit comments