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 0e7fd4c commit 9f980fcCopy full SHA for 9f980fc
lightning/src/ln/channelmanager.rs
@@ -7203,7 +7203,11 @@ where
7203
};
7204
pending_offers_messages.push(message);
7205
} else {
7206
- for path in offer.paths() {
+ // Send as many invoice requests as there are paths in the offer (with an upper bound).
7207
+ // Using only one path could result in a failure if the path no longer exists. But only
7208
+ // one invoice for a given payment id will be paid, even if more than one is received.
7209
+ const REQUEST_LIMIT: usize = 10;
7210
+ for path in offer.paths().into_iter().take(REQUEST_LIMIT) {
7211
let message = PendingOnionMessage {
7212
contents: OffersMessage::InvoiceRequest(invoice_request.clone()),
7213
destination: Destination::BlindedPath(path.clone()),
0 commit comments