rust-lightning
rust-lightning copied to clipboard
Introduce Retry InvoiceRequest Flow
resolves #2836
Description:
- Add functionality to handle retrying the sending of
invoice_request
messages on new reply_paths that are still awaiting invoices.
Changes:
- Introduced invoice_request as an optional field in the
PendingOutboundPayments::AwaitingInvoice
variant to accommodate instances without invoice requests. - Refactored logic from
pay_for_offer
to create invoice request messages into a separate function for reuse with retry message flow. - Implemented the
retry_tick_occurred
function in ChannelManager to handle generating invoice request messages for AwaitingInvoice payments and enqueueing them. - Added
retry_tick_occurred
toln_background_processor
with a timer duration of 5 seconds for timely retries without overwhelming the system with too many onion messages.