@@ -1811,7 +1811,7 @@ mod fuzzy_internal_msgs {
18111811 pub outgoing_cltv_value : u32 ,
18121812 }
18131813
1814- #[ allow ( unused ) ]
1814+ #[ cfg ( trampoline ) ]
18151815 pub struct InboundTrampolineEntrypointPayload {
18161816 pub amt_to_forward : u64 ,
18171817 pub outgoing_cltv_value : u32 ,
@@ -1851,7 +1851,7 @@ mod fuzzy_internal_msgs {
18511851
18521852 pub enum InboundOnionPayload {
18531853 Forward ( InboundOnionForwardPayload ) ,
1854- #[ allow ( unused ) ]
1854+ #[ cfg ( trampoline ) ]
18551855 TrampolineEntrypoint ( InboundTrampolineEntrypointPayload ) ,
18561856 Receive ( InboundOnionReceivePayload ) ,
18571857 BlindedForward ( InboundOnionBlindedForwardPayload ) ,
@@ -2943,6 +2943,7 @@ impl<NS: Deref> ReadableArgs<(Option<PublicKey>, NS)> for InboundOnionPayload wh
29432943 let mut payment_metadata: Option < WithoutLength < Vec < u8 > > > = None ;
29442944 let mut total_msat = None ;
29452945 let mut keysend_preimage: Option < PaymentPreimage > = None ;
2946+ #[ cfg_attr( not( trampoline) , allow( unused) ) ]
29462947 let mut trampoline_onion_packet: Option < TrampolineOnionPacket > = None ;
29472948 let mut invoice_request: Option < InvoiceRequest > = None ;
29482949 let mut custom_tlvs = Vec :: new ( ) ;
@@ -2975,18 +2976,21 @@ impl<NS: Deref> ReadableArgs<(Option<PublicKey>, NS)> for InboundOnionPayload wh
29752976 return Err ( DecodeError :: InvalidValue )
29762977 }
29772978
2979+ #[ cfg( trampoline) ]
29782980 if let Some ( trampoline_onion_packet) = trampoline_onion_packet {
29792981 if payment_metadata. is_some ( ) || encrypted_tlvs_opt. is_some ( ) ||
29802982 total_msat. is_some ( )
29812983 { return Err ( DecodeError :: InvalidValue ) }
2982- Ok ( Self :: TrampolineEntrypoint ( InboundTrampolineEntrypointPayload {
2984+ return Ok ( Self :: TrampolineEntrypoint ( InboundTrampolineEntrypointPayload {
29832985 amt_to_forward : amt. ok_or ( DecodeError :: InvalidValue ) ?,
29842986 outgoing_cltv_value : cltv_value. ok_or ( DecodeError :: InvalidValue ) ?,
29852987 multipath_trampoline_data : payment_data,
29862988 trampoline_packet : trampoline_onion_packet,
2987- current_path_key : intro_node_blinding_point
2989+ current_path_key : intro_node_blinding_point,
29882990 } ) )
2989- } else if let Some ( blinding_point) = intro_node_blinding_point. or ( update_add_blinding_point) {
2991+ }
2992+
2993+ if let Some ( blinding_point) = intro_node_blinding_point. or ( update_add_blinding_point) {
29902994 if short_id. is_some ( ) || payment_data. is_some ( ) || payment_metadata. is_some ( ) {
29912995 return Err ( DecodeError :: InvalidValue )
29922996 }
0 commit comments