@@ -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) ]
@@ -1766,9 +1767,19 @@ mod fuzzy_internal_msgs {
1766
1767
/// The value, in msat, of the payment after this hop's fee is deducted.
1767
1768
amt_to_forward : u64 ,
1768
1769
outgoing_cltv_value : u32 ,
1769
- /// The node id to which the trampoline node must find a route
1770
+ /// The node id to which the trampoline node must find a route.
1770
1771
outgoing_node_id : PublicKey ,
1771
- }
1772
+ } ,
1773
+ #[ allow( unused) ]
1774
+ BlindedForward {
1775
+ /// The value, in msat, of the payment after this hop's fee is deducted.
1776
+ amt_to_forward : u64 ,
1777
+ outgoing_cltv_value : u32 ,
1778
+ /// List of blinded path options the last trampoline hop may choose to route through.
1779
+ payment_paths : Vec < BlindedPath > ,
1780
+ /// If applicable, features of the BOLT12 invoice being paid.
1781
+ invoice_features : Option < Bolt12InvoiceFeatures >
1782
+ } ,
1772
1783
}
1773
1784
1774
1785
pub struct DecodedOnionErrorPacket {
@@ -2665,7 +2676,15 @@ impl Writeable for OutboundTrampolinePayload {
2665
2676
( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2666
2677
( 14 , outgoing_node_id, required)
2667
2678
} ) ;
2668
- }
2679
+ } ,
2680
+ Self :: BlindedForward { amt_to_forward, outgoing_cltv_value, payment_paths, invoice_features } => {
2681
+ _encode_varint_length_prefixed_tlv ! ( w, {
2682
+ ( 2 , HighZeroBytesDroppedBigSize ( * amt_to_forward) , required) ,
2683
+ ( 4 , HighZeroBytesDroppedBigSize ( * outgoing_cltv_value) , required) ,
2684
+ ( 66097 , invoice_features, option) ,
2685
+ ( 66102 , * payment_paths, required_vec)
2686
+ } ) ;
2687
+ } ,
2669
2688
}
2670
2689
Ok ( ( ) )
2671
2690
}
0 commit comments