@@ -1746,9 +1746,10 @@ pub struct FinalOnionHopData {
1746
1746
1747
1747
mod fuzzy_internal_msgs {
1748
1748
use bitcoin:: secp256k1:: PublicKey ;
1749
+ use crate :: blinded_path:: BlindedPath ;
1749
1750
use crate :: blinded_path:: payment:: { PaymentConstraints , PaymentContext , PaymentRelay } ;
1750
1751
use crate :: ln:: types:: { PaymentPreimage , PaymentSecret } ;
1751
- use crate :: ln:: features:: BlindedHopFeatures ;
1752
+ use crate :: ln:: features:: { BlindedHopFeatures , Bolt12InvoiceFeatures } ;
1752
1753
use super :: { FinalOnionHopData , TrampolineOnionPacket } ;
1753
1754
1754
1755
#[ allow( unused_imports) ]
@@ -1836,9 +1837,19 @@ mod fuzzy_internal_msgs {
1836
1837
/// The value, in msat, of the payment after this hop's fee is deducted.
1837
1838
amt_to_forward : u64 ,
1838
1839
outgoing_cltv_value : u32 ,
1839
- /// The node id to which the trampoline node must find a route
1840
+ /// The node id to which the trampoline node must find a route.
1840
1841
outgoing_node_id : PublicKey ,
1841
- }
1842
+ } ,
1843
+ #[ allow( unused) ]
1844
+ BlindedForward {
1845
+ /// The value, in msat, of the payment after this hop's fee is deducted.
1846
+ amt_to_forward : u64 ,
1847
+ outgoing_cltv_value : u32 ,
1848
+ /// List of blinded path options the last trampoline hop may choose to route through.
1849
+ payment_paths : Vec < BlindedPath > ,
1850
+ /// If applicable, features of the BOLT12 invoice being paid.
1851
+ invoice_features : Option < Bolt12InvoiceFeatures >
1852
+ } ,
1842
1853
}
1843
1854
1844
1855
pub struct DecodedOnionErrorPacket {
@@ -2763,7 +2774,15 @@ impl Writeable for OutboundTrampolinePayload {
2763
2774
( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2764
2775
( 14 , outgoing_node_id, required)
2765
2776
} ) ;
2766
- }
2777
+ } ,
2778
+ Self :: BlindedForward { amt_to_forward, outgoing_cltv_value, payment_paths, invoice_features } => {
2779
+ _encode_varint_length_prefixed_tlv ! ( w, {
2780
+ ( 2 , HighZeroBytesDroppedBigSize ( * amt_to_forward) , required) ,
2781
+ ( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2782
+ ( 66097 , invoice_features, option) ,
2783
+ ( 66102 , * payment_paths, required_vec)
2784
+ } ) ;
2785
+ } ,
2767
2786
}
2768
2787
Ok ( ( ) )
2769
2788
}
0 commit comments