Skip to content

Commit 40e436e

Browse files
committed
f fix comments
1 parent afb468a commit 40e436e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lightning/src/ln/channelmanager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2477,7 +2477,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
24772477
/// irrevocably committed to on our end. In such a case, do NOT retry the payment with a
24782478
/// different route unless you intend to pay twice!
24792479
///
2480-
/// Provide recipient_info to include payment_secret or payment_metadata), note that the
2480+
/// Provide recipient_info to include payment_secret or payment_metadata, note that the
24812481
/// payment_secret is unrelated to payment_hash (or PaymentPreimage) and exists to authenticate
24822482
/// the sender to the recipient and prevent payment-probing (deanonymization) attacks. For
24832483
/// newer nodes, it will be provided to you in the invoice. If you do not have one, the Route

lightning/src/ln/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ pub struct PaymentPreimage(pub [u8;32]);
8686
/// (C-not exported) as we just use [u8; 32] directly
8787
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
8888
pub struct PaymentSecret(pub [u8;32]);
89-
/// recipient-info type, use to provide payment_secret or bolt11 payment_metadata
89+
/// Additional BOLT 11 data to attach to the payment, useful for applications where the recipient
90+
/// doesn't keep any context for the payment.
9091
#[derive(Clone, Debug, PartialEq)]
9192
pub struct RecipientInfo {
92-
/// optional payment_secret
93+
/// Optional payment secret provided by the recipient as part of a BOLT 11 invoice.
9394
pub payment_secret: Option<PaymentSecret>,
94-
/// optional bolt11 payment_metadata
95+
/// Optional arbitrary data provided by the recipient as part of a BOLT 11 invoice.
9596
pub payment_metadata: Option<Vec<u8>>,
9697
}
9798

lightning/src/util/events.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ pub enum PaymentPurpose {
6060
/// [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment
6161
/// [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
6262
payment_secret: PaymentSecret,
63-
///XXX
63+
/// Additional metadata to attach to the payment. This supports applications where the recipient doesn't keep any context for the payment.
64+
/// Note that the size of this field is limited by the maximum hop payload size. Long metadata fields reduce the maximum route length.
6465
payment_metadata: Option<Vec<u8>>,
6566
},
6667
/// Because this is a spontaneous payment, the payer generated their own preimage rather than us

0 commit comments

Comments
 (0)