@@ -1746,8 +1746,7 @@ pub struct FinalOnionHopData {
1746
1746
1747
1747
mod fuzzy_internal_msgs {
1748
1748
use bitcoin:: secp256k1:: PublicKey ;
1749
- use crate :: blinded_path:: BlindedPath ;
1750
- use crate :: blinded_path:: payment:: { PaymentConstraints , PaymentContext , PaymentRelay } ;
1749
+ use crate :: blinded_path:: payment:: { BlindedPaymentPath , PaymentConstraints , PaymentContext , PaymentRelay } ;
1751
1750
use crate :: ln:: types:: { PaymentPreimage , PaymentSecret } ;
1752
1751
use crate :: ln:: features:: { BlindedHopFeatures , Bolt12InvoiceFeatures } ;
1753
1752
use super :: { FinalOnionHopData , TrampolineOnionPacket } ;
@@ -1841,12 +1840,14 @@ mod fuzzy_internal_msgs {
1841
1840
outgoing_node_id : PublicKey ,
1842
1841
} ,
1843
1842
#[ allow( unused) ]
1843
+ /// This is the last Trampoline hop, whereupon the Trampoline forward mechanism is exited,
1844
+ /// and payment data is relayed using non-Trampoline blinded hops
1844
1845
BlindedForward {
1845
1846
/// The value, in msat, of the payment after this hop's fee is deducted.
1846
1847
amt_to_forward : u64 ,
1847
1848
outgoing_cltv_value : u32 ,
1848
1849
/// List of blinded path options the last trampoline hop may choose to route through.
1849
- payment_paths : Vec < BlindedPath > ,
1850
+ payment_paths : Vec < BlindedPaymentPath > ,
1850
1851
/// If applicable, features of the BOLT12 invoice being paid.
1851
1852
invoice_features : Option < Bolt12InvoiceFeatures >
1852
1853
} ,
@@ -2776,12 +2777,16 @@ impl Writeable for OutboundTrampolinePayload {
2776
2777
} ) ;
2777
2778
} ,
2778
2779
Self :: BlindedForward { amt_to_forward, outgoing_cltv_value, payment_paths, invoice_features } => {
2780
+ let blinded_path_value: Vec < u8 > = payment_paths. iter ( ) . flat_map ( |p| {
2781
+ p. inner_blinded_path ( ) . encode ( ) . into_iter ( ) . chain ( p. payinfo . encode ( ) ) . collect :: < Vec < u8 > > ( )
2782
+ } ) . collect ( ) ;
2783
+ let blinded_path_tlv = ( 22 , blinded_path_value) ;
2784
+
2779
2785
_encode_varint_length_prefixed_tlv ! ( w, {
2780
2786
( 2 , HighZeroBytesDroppedBigSize ( * amt_to_forward) , required) ,
2781
2787
( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2782
- ( 66097 , invoice_features, option) ,
2783
- ( 66102 , * payment_paths, required_vec)
2784
- } ) ;
2788
+ ( 21 , invoice_features. as_ref( ) . map( |m| WithoutLength ( m) ) , option)
2789
+ } , [ & blinded_path_tlv] ) ;
2785
2790
} ,
2786
2791
}
2787
2792
Ok ( ( ) )
0 commit comments