@@ -1677,9 +1677,10 @@ pub struct FinalOnionHopData {
1677
1677
1678
1678
mod fuzzy_internal_msgs {
1679
1679
use bitcoin:: secp256k1:: PublicKey ;
1680
+ use crate :: blinded_path:: BlindedPath ;
1680
1681
use crate :: blinded_path:: payment:: { PaymentConstraints , PaymentContext , PaymentRelay } ;
1681
1682
use crate :: ln:: types:: { PaymentPreimage , PaymentSecret } ;
1682
- use crate :: ln:: features:: BlindedHopFeatures ;
1683
+ use crate :: ln:: features:: { BlindedHopFeatures , Bolt12InvoiceFeatures } ;
1683
1684
use super :: { FinalOnionHopData , TrampolineOnionPacket } ;
1684
1685
1685
1686
#[ allow( unused_imports) ]
@@ -1771,19 +1772,13 @@ mod fuzzy_internal_msgs {
1771
1772
} ,
1772
1773
#[ allow( unused) ]
1773
1774
BlindedForward {
1774
- encrypted_tlvs : Vec < u8 > ,
1775
- intro_node_blinding_point : Option < PublicKey > ,
1775
+ amt_to_forward : u64 ,
1776
+ outgoing_cltv_value : u32 ,
1777
+ // experimental TLV: 66102
1778
+ payment_paths : Vec < BlindedPath > ,
1779
+ // experimental TLV: 66097
1780
+ invoice_features : Option < Bolt12InvoiceFeatures >
1776
1781
} ,
1777
- #[ allow( unused) ]
1778
- BlindedReceive {
1779
- sender_intended_htlc_amt_msat : u64 ,
1780
- total_msat : u64 ,
1781
- cltv_expiry_height : u32 ,
1782
- encrypted_tlvs : Vec < u8 > ,
1783
- intro_node_blinding_point : Option < PublicKey > , // Set if the introduction node of the blinded path is the final node
1784
- keysend_preimage : Option < PaymentPreimage > ,
1785
- custom_tlvs : Vec < ( u64 , Vec < u8 > ) > ,
1786
- }
1787
1782
}
1788
1783
1789
1784
pub struct DecodedOnionErrorPacket {
@@ -2681,30 +2676,14 @@ impl Writeable for OutboundTrampolinePayload {
2681
2676
( 14 , outgoing_node_id, required)
2682
2677
} ) ;
2683
2678
} ,
2684
- Self :: BlindedForward { encrypted_tlvs , intro_node_blinding_point } => {
2679
+ Self :: BlindedForward { amt_to_forward , outgoing_cltv_value , payment_paths , invoice_features } => {
2685
2680
_encode_varint_length_prefixed_tlv ! ( w, {
2686
- ( 10 , * encrypted_tlvs, required_vec) ,
2687
- ( 12 , intro_node_blinding_point, option)
2681
+ ( 2 , HighZeroBytesDroppedBigSize ( * amt_to_forward) , required) ,
2682
+ ( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2683
+ ( 66097 , invoice_features, option) ,
2684
+ ( 66102 , * payment_paths, required_vec)
2688
2685
} ) ;
2689
2686
} ,
2690
- Self :: BlindedReceive {
2691
- sender_intended_htlc_amt_msat, total_msat, cltv_expiry_height, encrypted_tlvs,
2692
- intro_node_blinding_point, keysend_preimage, ref custom_tlvs,
2693
- } => {
2694
- // We need to update [`ln::outbound_payment::RecipientOnionFields::with_custom_tlvs`]
2695
- // to reject any reserved types in the experimental range if new ones are ever
2696
- // standardized.
2697
- let keysend_tlv = keysend_preimage. map ( |preimage| ( 5482373484 , preimage. encode ( ) ) ) ;
2698
- let mut custom_tlvs: Vec < & ( u64 , Vec < u8 > ) > = custom_tlvs. iter ( ) . chain ( keysend_tlv. iter ( ) ) . collect ( ) ;
2699
- custom_tlvs. sort_unstable_by_key ( |( typ, _) | * typ) ;
2700
- _encode_varint_length_prefixed_tlv ! ( w, {
2701
- ( 2 , HighZeroBytesDroppedBigSize ( * sender_intended_htlc_amt_msat) , required) ,
2702
- ( 4 , HighZeroBytesDroppedBigSize ( * cltv_expiry_height) , required) ,
2703
- ( 10 , * encrypted_tlvs, required_vec) ,
2704
- ( 12 , intro_node_blinding_point, option) ,
2705
- ( 18 , HighZeroBytesDroppedBigSize ( * total_msat) , required)
2706
- } , custom_tlvs. iter( ) ) ;
2707
- } ,
2708
2687
}
2709
2688
Ok ( ( ) )
2710
2689
}
0 commit comments