]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Update docs on `PaymentFailureReason::RouteNotFound` to add context 2024-02-better-rnf-docs
authorMatt Corallo <git@bluematt.me>
Thu, 29 Feb 2024 14:50:26 +0000 (14:50 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 29 Feb 2024 14:51:21 +0000 (14:51 +0000)
tnull noted on discord that its somewhat unclear to users what
`RouteNotFound` actually means - that we ran out of routes, rather
than could not find a route at all - so the docs are updated here.

lightning/src/events/mod.rs

index d08d3c5ac6ba163b100e5392a4b86cea8fce6841..485a23e0292e520c28d47a226fe7de51abdd9690 100644 (file)
@@ -368,6 +368,10 @@ pub enum PaymentFailureReason {
        /// [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
        PaymentExpired,
        /// We failed to find a route while retrying the payment.
+       ///
+       /// Note that this generally indicates that we've exhausted the available set of possible
+       /// routes - we tried the payment over a few routes but were not able to find any further
+       /// candidate routes beyond those.
        RouteNotFound,
        /// This error should generally never happen. This likely means that there is a problem with
        /// your router.