Skip to content

Update Event::PaymentReceived docs since we require payment secret #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions lightning/src/util/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,20 @@ pub enum Event {
user_channel_id: u64,
},
/// Indicates we've received money! Just gotta dig out that payment preimage and feed it to
/// ChannelManager::claim_funds to get it....
/// Note that if the preimage is not known or the amount paid is incorrect, you should call
/// ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid
/// [`ChannelManager::claim_funds`] to get it....
/// Note that if the preimage is not known, you should call
/// [`ChannelManager::fail_htlc_backwards`] to free up resources for this HTLC and avoid
/// network congestion.
/// The amount paid should be considered 'incorrect' when it is less than or more than twice
/// the amount expected.
/// If you fail to call either ChannelManager::claim_funds or
/// ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be
/// If you fail to call either [`ChannelManager::claim_funds`] or
/// [`ChannelManager::fail_htlc_backwards`] within the HTLC's timeout, the HTLC will be
/// automatically failed.
///
/// [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
/// [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
PaymentReceived {
/// The hash for which the preimage should be handed to the ChannelManager.
payment_hash: PaymentHash,
/// The value, in thousandths of a satoshi, that this payment is for. Note that you must
/// compare this to the expected value before accepting the payment (as otherwise you are
/// providing proof-of-payment for less than the value you expected!).
/// The value, in thousandths of a satoshi, that this payment is for.
amt: u64,
/// Information for claiming this received payment, based on whether the purpose of the
/// payment is to pay an invoice or to send a spontaneous payment.
Expand Down