Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ManualRoutingParameters #3342

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Sep 26, 2024

  1. Introduce ManualRoutingParameters

    With the current architecture, `pay_for_offer` only allows setting
    `max_total_routing_fee_msat` as a route parameter. However, it doesn't
    provide users the flexibility to set other important parameters.
    
    This commit introduces a new struct, `ManualRoutingParameters`,
    that optionally allows users to set additional routing parameters.
    In later commits, this struct will be utilized when paying BOLT12 invoices.
    shaavan committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    c52ab5f View commit details
    Browse the repository at this point in the history
  2. Update AwaitingInvoice to Include ManualRoutingParameters

    When `pay_for_offer` is called, it creates a new `PendingOutboundPayment`
    entry with relevant values used when the corresponding invoice is received.
    This update modifies `AwaitingInvoice` to include the entire
    `ManualRoutingParameters` struct instead of just `max_total_routing_fee_msat`.
    This change ensures that all manual routing parameters are available when
    finding the payment route.
    shaavan committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    e0600cc View commit details
    Browse the repository at this point in the history
  3. Extend pay_for_offer to accept ManualRoutingParameters

    This update allows users to call `pay_for_offer` with a set of parameters
    they wish to manually set for routing the corresponding invoice. By
    accepting `ManualRoutingParameters`, users gain greater control over the
    routing process.
    shaavan committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    2297ce3 View commit details
    Browse the repository at this point in the history
  4. Utilize ManualRoutingParameters to create new RouteParams

    In addition to using PaymentParameters from the invoice, this commit
    enables the creation of RouteParameters using the values optionally
    set in ManualRoutingParameters.
    shaavan committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    271522d View commit details
    Browse the repository at this point in the history