@@ -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,
@@ -2680,6 +2681,7 @@ where
2680
2681
routing: PendingHTLCRouting::Forward {
2681
2682
onion_packet: outgoing_packet,
2682
2683
short_channel_id,
2684
+ incoming_cltv_expiry: Some(msg.cltv_expiry),
2683
2685
},
2684
2686
payment_hash: msg.payment_hash,
2685
2687
incoming_shared_secret: shared_secret,
@@ -3706,8 +3708,9 @@ where
3706
3708
})?;
3707
3709
3708
3710
let routing = match payment.forward_info.routing {
3709
- PendingHTLCRouting::Forward { onion_packet, .. } => {
3710
- PendingHTLCRouting::Forward { onion_packet, short_channel_id: next_hop_scid }
3711
+ PendingHTLCRouting::Forward { onion_packet, incoming_cltv_expiry, .. } => {
3712
+ PendingHTLCRouting::Forward { onion_packet, short_channel_id: next_hop_scid,
3713
+ incoming_cltv_expiry }
3711
3714
},
3712
3715
_ => unreachable!() // Only `PendingHTLCRouting::Forward`s are intercepted
3713
3716
};
@@ -7701,6 +7704,7 @@ impl_writeable_tlv_based!(PhantomRouteHints, {
7701
7704
impl_writeable_tlv_based_enum!(PendingHTLCRouting,
7702
7705
(0, Forward) => {
7703
7706
(0, onion_packet, required),
7707
+ (1, incoming_cltv_expiry, option),
7704
7708
(2, short_channel_id, required),
7705
7709
},
7706
7710
(1, Receive) => {
0 commit comments