@@ -15,20 +15,21 @@ use crate::util::ser::{Readable, Writeable, Writer};
1515
1616/// Data to construct a [`BlindedHop`] for forwarding a payment. 
1717pub  struct  ForwardTlvs  { 
18- 	/// The short channel id this payment is being  forwarded over. 
18+ 	/// The short channel id this payment should be  forwarded out  over. 
1919short_channel_id :  u64 , 
20- 	/// Payment parameters for relaying over this channel . 
20+ 	/// Payment parameters for relaying over [`Self::short_channel_id`] . 
2121payment_relay :  PaymentRelay , 
22- 	/// Payment constraints when  relaying over this channel . 
22+ 	/// Payment constraints for  relaying over [`Self::short_channel_id`] . 
2323payment_constraints :  PaymentConstraints , 
2424	/// Supported and required features when relaying a payment onion containing this object's 
25- /// corresponding [`BlindedHop`]. 
25+ /// corresponding [`BlindedHop::encrypted_payload `]. 
2626/// 
27- /// [`BlindedHop`]: crate::blinded_path::BlindedHop 
27+ /// [`BlindedHop::encrypted_payload `]: crate::blinded_path::BlindedHop::encrypted_payload  
2828features :  BlindedHopFeatures , 
2929} 
3030
31- /// Data to construct a [`BlindedHop`] for receiving a payment. 
31+ /// Data to construct a [`BlindedHop`] for receiving a payment. This payload is custom to LDK and 
32+ /// may not be valid if received by another lightning implementation. 
3233pub  struct  ReceiveTlvs  { 
3334	/// Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together. 
3435payment_secret :  PaymentSecret , 
@@ -40,9 +41,9 @@ pub struct ReceiveTlvs {
4041/// 
4142/// [`BlindedHop`]: crate::blinded_path::BlindedHop 
4243pub ( crate )  enum  BlindedPaymentTlvs  { 
43- 	/// This blinded payment data is to be forwarded . 
44+ 	/// This blinded payment data is for a forwarding node . 
4445Forward ( ForwardTlvs ) , 
45- 	/// This blinded payment data is to be received . 
46+ 	/// This blinded payment data is for the receiving node . 
4647Receive ( ReceiveTlvs ) , 
4748} 
4849
@@ -112,10 +113,10 @@ impl Readable for BlindedPaymentTlvs {
112113		_init_and_read_tlv_stream ! ( r,  { 
113114			( 1 ,  _padding,  option) , 
114115			( 2 ,  scid,  option) , 
115- 			( 6 ,  payment_secret,  option) , 
116116			( 10 ,  payment_relay,  option) , 
117117			( 12 ,  payment_constraints,  required) , 
118118			( 14 ,  features,  option) , 
119+ 			( 65536 ,  payment_secret,  option) , 
119120		} ) ; 
120121		if  let  Some ( short_channel_id)  = scid { 
121122			if  payment_secret. is_some ( )  {  return  Err ( DecodeError :: InvalidValue )  } 
0 commit comments