@@ -104,6 +104,7 @@ pub(super) enum PendingHTLCRouting {
104
104
/// The SCID from the onion that we should forward to. This could be a real SCID or a fake one
105
105
/// generated using `get_fake_scid` from the scid_utils::fake_scid module.
106
106
short_channel_id : u64 , // This should be NonZero<u64> eventually when we bump MSRV
107
+ incoming_cltv_expiry : Option < u32 > ,
107
108
} ,
108
109
Receive {
109
110
payment_data : msgs:: FinalOnionHopData ,
@@ -3002,6 +3003,7 @@ where
3002
3003
routing : PendingHTLCRouting :: Forward {
3003
3004
onion_packet : outgoing_packet,
3004
3005
short_channel_id,
3006
+ incoming_cltv_expiry : Some ( msg. cltv_expiry ) ,
3005
3007
} ,
3006
3008
payment_hash : msg. payment_hash . clone ( ) ,
3007
3009
incoming_shared_secret : shared_secret,
@@ -3669,8 +3671,9 @@ where
3669
3671
} ) ?;
3670
3672
3671
3673
let routing = match payment. forward_info . routing {
3672
- PendingHTLCRouting :: Forward { onion_packet, .. } => {
3673
- PendingHTLCRouting :: Forward { onion_packet, short_channel_id : next_hop_scid }
3674
+ PendingHTLCRouting :: Forward { onion_packet, incoming_cltv_expiry, .. } => {
3675
+ PendingHTLCRouting :: Forward { onion_packet, short_channel_id : next_hop_scid,
3676
+ incoming_cltv_expiry }
3674
3677
} ,
3675
3678
_ => unreachable ! ( ) // Only `PendingHTLCRouting::Forward`s are intercepted
3676
3679
} ;
@@ -7615,6 +7618,7 @@ impl_writeable_tlv_based!(PhantomRouteHints, {
7615
7618
impl_writeable_tlv_based_enum ! ( PendingHTLCRouting ,
7616
7619
( 0 , Forward ) => {
7617
7620
( 0 , onion_packet, required) ,
7621
+ ( 1 , incoming_cltv_expiry, option) ,
7618
7622
( 2 , short_channel_id, required) ,
7619
7623
} ,
7620
7624
( 1 , Receive ) => {
0 commit comments