Skip to content

Commit 946a0a5

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 946a0a5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lightning/src/util/events.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ 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,

0 commit comments

Comments
 (0)