Update keysend docs

This commit is contained in:
Valentine Wallace 2021-08-06 18:17:58 -04:00
parent 853007800e
commit 929259e546
No known key found for this signature in database
GPG key ID: F88EC43B95E601B8

View file

@ -1912,9 +1912,13 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
/// would be able to guess -- otherwise, an intermediate node may claim the payment and it will /// would be able to guess -- otherwise, an intermediate node may claim the payment and it will
/// never reach the recipient. /// never reach the recipient.
/// ///
/// See [`send_payment`] documentation for more details on the return value of this function.
///
/// Similar to regular payments, you MUST NOT reuse a `payment_preimage` value. See /// Similar to regular payments, you MUST NOT reuse a `payment_preimage` value. See
/// [`send_payment`] for more information about the risks of duplicate preimage usage. /// [`send_payment`] for more information about the risks of duplicate preimage usage.
/// ///
/// Note that `route` must have exactly one path.
///
/// [`send_payment`]: Self::send_payment /// [`send_payment`]: Self::send_payment
pub fn send_spontaneous_payment(&self, route: &Route, payment_preimage: Option<PaymentPreimage>) -> Result<PaymentHash, PaymentSendFailure> { pub fn send_spontaneous_payment(&self, route: &Route, payment_preimage: Option<PaymentPreimage>) -> Result<PaymentHash, PaymentSendFailure> {
let preimage = match payment_preimage { let preimage = match payment_preimage {