create_inbound_payment: warn about dup hashes
authorValentine Wallace <vwallace@protonmail.com>
Fri, 17 Dec 2021 00:27:13 +0000 (16:27 -0800)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 17 Dec 2021 00:27:13 +0000 (16:27 -0800)
Leftover feedback from #1177

lightning/src/ln/channelmanager.rs

index 612d2df0c99103ed981b52ec2a5fda2a9dd336b8..91eab154bd3aad1d5e8141a3df8a3560a8658e3d 100644 (file)
@@ -5026,8 +5026,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
        /// payment secret fetched via this method or [`create_inbound_payment`], and which is at least
        /// the `min_value_msat` provided here, if one is provided.
        ///
-       /// The [`PaymentHash`] (and corresponding [`PaymentPreimage`]) must be globally unique. This
-       /// method may return an Err if another payment with the same payment_hash is still pending.
+       /// The [`PaymentHash`] (and corresponding [`PaymentPreimage`]) should be globally unique, though
+       /// note that LDK will not stop you from registering duplicate payment hashes for inbound
+       /// payments.
        ///
        /// `min_value_msat` should be set if the invoice being generated contains a value. Any payment
        /// received for the returned [`PaymentHash`] will be required to be at least `min_value_msat`