Expand ChannelManager::send_spontaneous_payment_with_retry docs
authorValentine Wallace <vwallace@protonmail.com>
Mon, 6 Feb 2023 21:30:51 +0000 (16:30 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 6 Feb 2023 21:30:51 +0000 (16:30 -0500)
lightning/src/ln/channelmanager.rs

index 771e7c4a8c94100232d7d1ce95b92537302dfb4c..59d8e387529412a5d0dcd8adc61050791d8643fe 100644 (file)
@@ -2637,6 +2637,11 @@ where
 
        /// Similar to [`ChannelManager::send_spontaneous_payment`], but will automatically find a route
        /// based on `route_params` and retry failed payment paths based on `retry_strategy`.
+       ///
+       /// See [`PaymentParameters::for_keysend`] for help in constructing `route_params` for spontaneous
+       /// payments.
+       ///
+       /// [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend
        pub fn send_spontaneous_payment_with_retry(&self, payment_preimage: Option<PaymentPreimage>, payment_id: PaymentId, route_params: RouteParameters, retry_strategy: Retry) -> Result<PaymentHash, PaymentSendFailure> {
                let best_block_height = self.best_block.read().unwrap().height();
                self.pending_outbound_payments.send_spontaneous_payment(payment_preimage, payment_id,