@@ -195,12 +195,12 @@ pub enum PendingHTLCRouting {
195195 /// [`Event::PaymentClaimable::onion_fields`] as
196196 /// [`RecipientOnionFields::sender_custom_tlvs`].
197197 sender_custom_tlvs: Vec<(u64, Vec<u8>)>,
198- /// Custom TLVs set by the receiver in the blinded path used to reach them.
198+ /// Custom data set by the receiver in the blinded path used to reach them.
199199 ///
200200 /// For HTLCs received by LDK, this will be exposed in
201201 /// [`Event::PaymentClaimable::onion_fields`] as
202- /// [`RecipientOnionFields::user_custom_tlvs `].
203- user_custom_tlvs : Vec<u8>,
202+ /// [`RecipientOnionFields::user_custom_data `].
203+ user_custom_data : Vec<u8>,
204204 /// Set if this HTLC is the final hop in a multi-hop blinded path.
205205 requires_blinded_error: bool,
206206 },
@@ -231,11 +231,11 @@ pub enum PendingHTLCRouting {
231231 /// For HTLCs received by LDK, these will ultimately bubble back up as
232232 /// [`RecipientOnionFields::sender_custom_tlvs`].
233233 sender_custom_tlvs: Vec<(u64, Vec<u8>)>,
234- /// Custom TLVs set by the receiver in the blinded path used to reach them.
234+ /// Custom data set by the receiver in the blinded path used to reach them.
235235 ///
236236 /// For HTLCs received by LDK, these will ultimately bubble back up as
237- /// [`RecipientOnionFields::user_custom_tlvs `].
238- user_custom_tlvs : Vec<u8>,
237+ /// [`RecipientOnionFields::user_custom_data `].
238+ user_custom_data : Vec<u8>,
239239 /// Set if this HTLC is the final hop in a multi-hop blinded path.
240240 requires_blinded_error: bool,
241241 /// Set if we are receiving a keysend to a blinded path, meaning we created the
@@ -6062,26 +6062,26 @@ where
60626062 ) = match routing {
60636063 PendingHTLCRouting::Receive {
60646064 payment_data, payment_metadata, payment_context,
6065- incoming_cltv_expiry, phantom_shared_secret, sender_custom_tlvs, user_custom_tlvs ,
6065+ incoming_cltv_expiry, phantom_shared_secret, sender_custom_tlvs, user_custom_data ,
60666066 requires_blinded_error: _
60676067 } => {
60686068 let _legacy_hop_data = Some(payment_data.clone());
60696069 let onion_fields = RecipientOnionFields { payment_secret: Some(payment_data.payment_secret),
6070- payment_metadata, sender_custom_tlvs, user_custom_tlvs };
6070+ payment_metadata, sender_custom_tlvs, user_custom_data };
60716071 (incoming_cltv_expiry, OnionPayload::Invoice { _legacy_hop_data },
60726072 Some(payment_data), payment_context, phantom_shared_secret, onion_fields,
60736073 true)
60746074 },
60756075 PendingHTLCRouting::ReceiveKeysend {
60766076 payment_data, payment_preimage, payment_metadata,
6077- incoming_cltv_expiry, sender_custom_tlvs, user_custom_tlvs , requires_blinded_error: _,
6077+ incoming_cltv_expiry, sender_custom_tlvs, user_custom_data , requires_blinded_error: _,
60786078 has_recipient_created_payment_secret,
60796079 } => {
60806080 let onion_fields = RecipientOnionFields {
60816081 payment_secret: payment_data.as_ref().map(|data| data.payment_secret),
60826082 payment_metadata,
60836083 sender_custom_tlvs,
6084- user_custom_tlvs ,
6084+ user_custom_data ,
60856085 };
60866086 (incoming_cltv_expiry, OnionPayload::Spontaneous(payment_preimage),
60876087 payment_data, None, None, onion_fields, has_recipient_created_payment_secret)
@@ -12400,7 +12400,7 @@ impl_writeable_tlv_based_enum!(PendingHTLCRouting,
1240012400 (5, sender_custom_tlvs, optional_vec),
1240112401 (7, requires_blinded_error, (default_value, false)),
1240212402 (9, payment_context, option),
12403- (11, user_custom_tlvs , optional_vec),
12403+ (11, user_custom_data , optional_vec),
1240412404 },
1240512405 (2, ReceiveKeysend) => {
1240612406 (0, payment_preimage, required),
@@ -12410,7 +12410,7 @@ impl_writeable_tlv_based_enum!(PendingHTLCRouting,
1241012410 (4, payment_data, option), // Added in 0.0.116
1241112411 (5, sender_custom_tlvs, optional_vec),
1241212412 (7, has_recipient_created_payment_secret, (default_value, false)),
12413- (9, user_custom_tlvs , optional_vec),
12413+ (9, user_custom_data , optional_vec),
1241412414 },
1241512415);
1241612416
@@ -15376,7 +15376,7 @@ mod tests {
1537615376 payment_secret: PaymentSecret([0; 32]), total_msat: sender_intended_amt_msat,
1537715377 }),
1537815378 sender_custom_tlvs: Vec::new(),
15379- user_custom_tlvs : Vec::new(),
15379+ user_custom_data : Vec::new(),
1538015380 };
1538115381 // Check that if the amount we received + the penultimate hop extra fee is less than the sender
1538215382 // intended amount, we fail the payment.
@@ -15399,7 +15399,7 @@ mod tests {
1539915399 payment_secret: PaymentSecret([0; 32]), total_msat: sender_intended_amt_msat,
1540015400 }),
1540115401 sender_custom_tlvs: Vec::new(),
15402- user_custom_tlvs : Vec::new(),
15402+ user_custom_data : Vec::new(),
1540315403 };
1540415404 let current_height: u32 = node[0].node.best_block.read().unwrap().height;
1540515405 assert!(create_recv_pending_htlc_info(hop_data, [0; 32], PaymentHash([0; 32]),
@@ -15424,7 +15424,7 @@ mod tests {
1542415424 payment_secret: PaymentSecret([0; 32]), total_msat: 100,
1542515425 }),
1542615426 sender_custom_tlvs: Vec::new(),
15427- user_custom_tlvs : Vec::new(),
15427+ user_custom_data : Vec::new(),
1542815428 }, [0; 32], PaymentHash([0; 32]), 100, 23, None, true, None, current_height);
1542915429
1543015430 // Should not return an error as this condition:
0 commit comments