Correct ChannelUnavailable error docs on `send_payment_with_route`
authorMatt Corallo <git@bluematt.me>
Thu, 21 Sep 2023 20:19:08 +0000 (20:19 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 26 Sep 2023 16:37:19 +0000 (16:37 +0000)
Monitor update failure can no longer lead to a `ChannelUnavailable`
error, but more common cases such as the peer being disconnected
always could, so those should be documented clearer.

lightning/src/ln/channelmanager.rs

index e2641d2cf16a7270faeb74887d7642f4cc40abeb..23b45077af02bafb0ea53df1f55455260283cf66 100644 (file)
@@ -3388,9 +3388,8 @@ where
        /// In general, a path may raise:
        ///  * [`APIError::InvalidRoute`] when an invalid route or forwarding parameter (cltv_delta, fee,
        ///    node public key) is specified.
        /// In general, a path may raise:
        ///  * [`APIError::InvalidRoute`] when an invalid route or forwarding parameter (cltv_delta, fee,
        ///    node public key) is specified.
-       ///  * [`APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
-       ///    (including due to previous monitor update failure or new permanent monitor update
-       ///    failure).
+       ///  * [`APIError::ChannelUnavailable`] if the next-hop channel is not available as it has been
+       ///    closed, doesn't exist, or the peer is currently disconnected.
        ///  * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
        ///    relevant updates.
        ///
        ///  * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
        ///    relevant updates.
        ///