offers: require opt_onion_message for incoming invoices too.

Changelog-Fixed: offers: require peers for blinded paths to have `option_onion_messages`, due to reports of LND not forwarding our blinded payments correctly.
This commit is contained in:
21M4TW
2025-11-18 10:38:13 +10:30
committed by Rusty Russell
parent a3441ff2d0
commit 29e4c3fef2

View File

@@ -381,7 +381,12 @@ static struct command_result *add_blindedpaths(struct command *cmd,
if (!we_want_blinded_path(cmd->plugin, true))
return create_invoicereq(cmd, ir);
return find_best_peer(cmd, 1ULL << OPT_ROUTE_BLINDING,
/* Technically, this only needs OPT_ROUTE_BLINDING, but we have a report
* of this failing with LND nodes, so we require both OPT_ROUTE_BLINDING
* *and* OPT_ONION_MESSAGES. This also helps support nodes which provide
* us onion messaging. */
return find_best_peer(cmd,
(1ULL << OPT_ROUTE_BLINDING) | (1ULL << OPT_ONION_MESSAGES),
found_best_peer, ir);
}