We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1227d2 commit 2c1a922Copy full SHA for 2c1a922
lightning/src/ln/channelmanager.rs
@@ -7201,7 +7201,11 @@ where
7201
};
7202
pending_offers_messages.push(message);
7203
} else {
7204
- for path in offer.paths() {
+ // Send as many invoice requests as there are paths in the offer (with an upper bound).
7205
+ // Using only one path could result in a failure if the path no longer exists. But only
7206
+ // one invoice for a given payment id will be paid, even if more than one is received.
7207
+ const REQUEST_LIMIT: usize = 10;
7208
+ for path in offer.paths().into_iter().take(REQUEST_LIMIT) {
7209
let message = PendingOnionMessage {
7210
contents: OffersMessage::InvoiceRequest(invoice_request.clone()),
7211
destination: Destination::BlindedPath(path.clone()),
0 commit comments