rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Introduce Retry InvoiceRequest Flow

Open shaavan opened this issue 10 months ago • 25 comments

resolves #2836

Description:

  • Add functionality to handle retrying the sending of invoice_request messages on new reply_paths that are still awaiting invoices.

Changes:

  1. Introduced invoice_request as an optional field in the PendingOutboundPayments::AwaitingInvoice variant to accommodate instances without invoice requests.
  2. Refactored logic from pay_for_offer to create invoice request messages into a separate function for reuse with retry message flow.
  3. Implemented the retry_tick_occurred function in ChannelManager to handle generating invoice request messages for AwaitingInvoice payments and enqueueing them.
  4. Added retry_tick_occurred to ln_background_processor with a timer duration of 5 seconds for timely retries without overwhelming the system with too many onion messages.

shaavan avatar Apr 22 '24 12:04 shaavan