@@ -404,13 +404,16 @@ pub struct BlindedTail {
404
404
pub excess_final_cltv_expiry_delta : u32 ,
405
405
/// The total amount paid on this [`Path`], excluding the fees.
406
406
pub final_value_msat : u64 ,
407
+ /// Used for determining the type of Trampoline path to construct
408
+ pub final_hop_supports_trampoline : bool
407
409
}
408
410
409
411
impl_writeable_tlv_based ! ( BlindedTail , {
410
412
( 0 , hops, required_vec) ,
411
413
( 2 , blinding_point, required) ,
412
414
( 4 , excess_final_cltv_expiry_delta, required) ,
413
415
( 6 , final_value_msat, required) ,
416
+ ( 8 , final_hop_supports_trampoline, required) ,
414
417
} ) ;
415
418
416
419
/// A path in a [`Route`] to the payment recipient. Must always be at least length one.
@@ -3343,6 +3346,7 @@ where L::Target: Logger {
3343
3346
blinding_point : blinded_path. blinding_point ( ) ,
3344
3347
excess_final_cltv_expiry_delta : 0 ,
3345
3348
final_value_msat : h. fee_msat ,
3349
+ final_hop_supports_trampoline : false
3346
3350
} )
3347
3351
} else { None }
3348
3352
} ) ;
@@ -7692,6 +7696,7 @@ mod tests {
7692
7696
blinding_point: ln_test_utils:: pubkey( 43 ) ,
7693
7697
excess_final_cltv_expiry_delta: 40 ,
7694
7698
final_value_msat: 100 ,
7699
+ final_hop_supports_trampoline: false ,
7695
7700
} ) } , Path {
7696
7701
hops: vec![ RouteHop {
7697
7702
pubkey: ln_test_utils:: pubkey( 51 ) ,
@@ -7718,6 +7723,7 @@ mod tests {
7718
7723
blinding_point : ln_test_utils:: pubkey ( 47 ) ,
7719
7724
excess_final_cltv_expiry_delta : 41 ,
7720
7725
final_value_msat : 101 ,
7726
+ final_hop_supports_trampoline : false ,
7721
7727
} ) ;
7722
7728
let encoded_route = route. encode ( ) ;
7723
7729
let decoded_route: Route = Readable :: read ( & mut Cursor :: new ( & encoded_route[ ..] ) ) . unwrap ( ) ;
@@ -7754,6 +7760,7 @@ mod tests {
7754
7760
blinding_point : ln_test_utils:: pubkey ( 48 ) ,
7755
7761
excess_final_cltv_expiry_delta : 0 ,
7756
7762
final_value_msat : 200 ,
7763
+ final_hop_supports_trampoline : false ,
7757
7764
} ) ,
7758
7765
} ;
7759
7766
inflight_htlcs. process_path ( & path, ln_test_utils:: pubkey ( 44 ) ) ;
@@ -7792,6 +7799,7 @@ mod tests {
7792
7799
blinding_point: ln_test_utils:: pubkey( 44 ) ,
7793
7800
excess_final_cltv_expiry_delta: 0 ,
7794
7801
final_value_msat: 200 ,
7802
+ final_hop_supports_trampoline: false ,
7795
7803
} ) ,
7796
7804
} ] , route_params : None } ;
7797
7805
0 commit comments