Skip to content

Propagate routing errors up to send_payment_for_bolt12_invoice #3159

Description

@tnull

1. When sending a payment via the async BOLT12 flow introduced in #3078, we would log-and-swallow any path finding errors and silently abandon the payment:

log_error!(logger, "Failed to find a route on retry, abandoning payment {}: {:#?}", &payment_id, e);
self.abandon_payment(payment_id, PaymentFailureReason::RouteNotFound, pending_events);
return

In order to tell the user what went wrong, it would be great to bubble up the Err from find_route_and_send_payment rather than continuing and returning Ok(()).

~~2. We should also early-abort sending in the regular pay_for_offer flow if we're certain we don't have sufficient liquidity (i.e. the offer amount surpasses the sum of our available next_outbound_htlc_limit_msats) ~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions