Skip to content

Commit 172ca85

Browse files
committed
Fix zero CLTV expiry delta in probing final hop
1 parent 6579ec3 commit 172ca85

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/probing.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ impl RandomStrategy {
572572
Some((node_features, channel_features, maybe_announced_channel))
573573
};
574574

575-
// Final hop: fee_msat carries the delivery amount; cltv delta is zero.
575+
// Final hop: fee_msat carries the delivery amount; cltv_expiry_delta carries the
576+
// destination's final CLTV (matching LDK's shifted-by-one RouteHop convention).
576577
{
577578
let (node_id, via_scid, pubkey) = route[last];
578579
let (node_features, channel_features, maybe_announced_channel) =
@@ -583,7 +584,7 @@ impl RandomStrategy {
583584
short_channel_id: via_scid,
584585
channel_features,
585586
fee_msat: amount_msat,
586-
cltv_expiry_delta: 0,
587+
cltv_expiry_delta: DEFAULT_MIN_FINAL_CLTV_EXPIRY_DELTA as u32,
587588
maybe_announced_channel,
588589
});
589590
}

0 commit comments

Comments
 (0)