Skip to content

Commit ab0739e

Browse files
authored
Merge pull request #1079 from TheBlueMatt/2021-09-stale-docs
Update Event::PaymentReceived docs since we require payment secret
2 parents 17d75a8 + 7478207 commit ab0739e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

lightning/src/util/events.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,20 @@ pub enum Event {
148148
user_channel_id: u64,
149149
},
150150
/// Indicates we've received money! Just gotta dig out that payment preimage and feed it to
151-
/// ChannelManager::claim_funds to get it....
152-
/// Note that if the preimage is not known or the amount paid is incorrect, you should call
153-
/// ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid
151+
/// [`ChannelManager::claim_funds`] to get it....
152+
/// Note that if the preimage is not known, you should call
153+
/// [`ChannelManager::fail_htlc_backwards`] to free up resources for this HTLC and avoid
154154
/// network congestion.
155-
/// The amount paid should be considered 'incorrect' when it is less than or more than twice
156-
/// the amount expected.
157-
/// If you fail to call either ChannelManager::claim_funds or
158-
/// ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be
155+
/// If you fail to call either [`ChannelManager::claim_funds`] or
156+
/// [`ChannelManager::fail_htlc_backwards`] within the HTLC's timeout, the HTLC will be
159157
/// automatically failed.
158+
///
159+
/// [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
160+
/// [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
160161
PaymentReceived {
161162
/// The hash for which the preimage should be handed to the ChannelManager.
162163
payment_hash: PaymentHash,
163-
/// The value, in thousandths of a satoshi, that this payment is for. Note that you must
164-
/// compare this to the expected value before accepting the payment (as otherwise you are
165-
/// providing proof-of-payment for less than the value you expected!).
164+
/// The value, in thousandths of a satoshi, that this payment is for.
166165
amt: u64,
167166
/// Information for claiming this received payment, based on whether the purpose of the
168167
/// payment is to pay an invoice or to send a spontaneous payment.

0 commit comments

Comments
 (0)