@@ -195,12 +195,12 @@ pub enum PendingHTLCRouting {
195
195
/// [`Event::PaymentClaimable::onion_fields`] as
196
196
/// [`RecipientOnionFields::sender_custom_tlvs`].
197
197
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.
199
199
///
200
200
/// For HTLCs received by LDK, this will be exposed in
201
201
/// [`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>,
204
204
/// Set if this HTLC is the final hop in a multi-hop blinded path.
205
205
requires_blinded_error: bool,
206
206
},
@@ -231,11 +231,11 @@ pub enum PendingHTLCRouting {
231
231
/// For HTLCs received by LDK, these will ultimately bubble back up as
232
232
/// [`RecipientOnionFields::sender_custom_tlvs`].
233
233
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.
235
235
///
236
236
/// 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>,
239
239
/// Set if this HTLC is the final hop in a multi-hop blinded path.
240
240
requires_blinded_error: bool,
241
241
/// Set if we are receiving a keysend to a blinded path, meaning we created the
@@ -6062,26 +6062,26 @@ where
6062
6062
) = match routing {
6063
6063
PendingHTLCRouting::Receive {
6064
6064
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 ,
6066
6066
requires_blinded_error: _
6067
6067
} => {
6068
6068
let _legacy_hop_data = Some(payment_data.clone());
6069
6069
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 };
6071
6071
(incoming_cltv_expiry, OnionPayload::Invoice { _legacy_hop_data },
6072
6072
Some(payment_data), payment_context, phantom_shared_secret, onion_fields,
6073
6073
true)
6074
6074
},
6075
6075
PendingHTLCRouting::ReceiveKeysend {
6076
6076
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: _,
6078
6078
has_recipient_created_payment_secret,
6079
6079
} => {
6080
6080
let onion_fields = RecipientOnionFields {
6081
6081
payment_secret: payment_data.as_ref().map(|data| data.payment_secret),
6082
6082
payment_metadata,
6083
6083
sender_custom_tlvs,
6084
- user_custom_tlvs ,
6084
+ user_custom_data ,
6085
6085
};
6086
6086
(incoming_cltv_expiry, OnionPayload::Spontaneous(payment_preimage),
6087
6087
payment_data, None, None, onion_fields, has_recipient_created_payment_secret)
@@ -12400,7 +12400,7 @@ impl_writeable_tlv_based_enum!(PendingHTLCRouting,
12400
12400
(5, sender_custom_tlvs, optional_vec),
12401
12401
(7, requires_blinded_error, (default_value, false)),
12402
12402
(9, payment_context, option),
12403
- (11, user_custom_tlvs , optional_vec),
12403
+ (11, user_custom_data , optional_vec),
12404
12404
},
12405
12405
(2, ReceiveKeysend) => {
12406
12406
(0, payment_preimage, required),
@@ -12410,7 +12410,7 @@ impl_writeable_tlv_based_enum!(PendingHTLCRouting,
12410
12410
(4, payment_data, option), // Added in 0.0.116
12411
12411
(5, sender_custom_tlvs, optional_vec),
12412
12412
(7, has_recipient_created_payment_secret, (default_value, false)),
12413
- (9, user_custom_tlvs , optional_vec),
12413
+ (9, user_custom_data , optional_vec),
12414
12414
},
12415
12415
);
12416
12416
@@ -15376,7 +15376,7 @@ mod tests {
15376
15376
payment_secret: PaymentSecret([0; 32]), total_msat: sender_intended_amt_msat,
15377
15377
}),
15378
15378
sender_custom_tlvs: Vec::new(),
15379
- user_custom_tlvs : Vec::new(),
15379
+ user_custom_data : Vec::new(),
15380
15380
};
15381
15381
// Check that if the amount we received + the penultimate hop extra fee is less than the sender
15382
15382
// intended amount, we fail the payment.
@@ -15399,7 +15399,7 @@ mod tests {
15399
15399
payment_secret: PaymentSecret([0; 32]), total_msat: sender_intended_amt_msat,
15400
15400
}),
15401
15401
sender_custom_tlvs: Vec::new(),
15402
- user_custom_tlvs : Vec::new(),
15402
+ user_custom_data : Vec::new(),
15403
15403
};
15404
15404
let current_height: u32 = node[0].node.best_block.read().unwrap().height;
15405
15405
assert!(create_recv_pending_htlc_info(hop_data, [0; 32], PaymentHash([0; 32]),
@@ -15424,7 +15424,7 @@ mod tests {
15424
15424
payment_secret: PaymentSecret([0; 32]), total_msat: 100,
15425
15425
}),
15426
15426
sender_custom_tlvs: Vec::new(),
15427
- user_custom_tlvs : Vec::new(),
15427
+ user_custom_data : Vec::new(),
15428
15428
}, [0; 32], PaymentHash([0; 32]), 100, 23, None, true, None, current_height);
15429
15429
15430
15430
// Should not return an error as this condition:
0 commit comments