Skip to content

Commit 7478207

Browse files
committed
Update Event::PaymentReceived docs since we require payment secret
Users no longer need to verify the amounts of received payments as the payment secret will protect us against the probing attacks such verification was intended to fix.
1 parent 088daf7 commit 7478207

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
@@ -92,21 +92,20 @@ pub enum Event {
9292
user_channel_id: u64,
9393
},
9494
/// Indicates we've received money! Just gotta dig out that payment preimage and feed it to
95-
/// ChannelManager::claim_funds to get it....
96-
/// Note that if the preimage is not known or the amount paid is incorrect, you should call
97-
/// ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid
95+
/// [`ChannelManager::claim_funds`] to get it....
96+
/// Note that if the preimage is not known, you should call
97+
/// [`ChannelManager::fail_htlc_backwards`] to free up resources for this HTLC and avoid
9898
/// network congestion.
99-
/// The amount paid should be considered 'incorrect' when it is less than or more than twice
100-
/// the amount expected.
101-
/// If you fail to call either ChannelManager::claim_funds or
102-
/// ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be
99+
/// If you fail to call either [`ChannelManager::claim_funds`] or
100+
/// [`ChannelManager::fail_htlc_backwards`] within the HTLC's timeout, the HTLC will be
103101
/// automatically failed.
102+
///
103+
/// [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
104+
/// [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
104105
PaymentReceived {
105106
/// The hash for which the preimage should be handed to the ChannelManager.
106107
payment_hash: PaymentHash,
107-
/// The value, in thousandths of a satoshi, that this payment is for. Note that you must
108-
/// compare this to the expected value before accepting the payment (as otherwise you are
109-
/// providing proof-of-payment for less than the value you expected!).
108+
/// The value, in thousandths of a satoshi, that this payment is for.
110109
amt: u64,
111110
/// Information for claiming this received payment, based on whether the purpose of the
112111
/// payment is to pay an invoice or to send a spontaneous payment.

0 commit comments

Comments
 (0)