Skip to content

Commit dcd8d58

Browse files
committed
Use CLTV_FAR_FAR_AWAY in PaymentConstraints
When finding a route through a blinded path, a random CLTV offset may be added to the path in order to preserve privacy. This needs to be accounted for in the blinded path's PaymentConstraints. Add CLTV_FAR_FAR_AWAY to the max_cltv_expiry constraint to allow for such offsets.
1 parent c558ccd commit dcd8d58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7876,7 +7876,8 @@ where
78767876
let secp_ctx = &self.secp_ctx;
78777877

78787878
let payee_node_id = self.get_our_node_id();
7879-
let max_cltv_expiry = self.best_block.read().unwrap().height() + LATENCY_GRACE_PERIOD_BLOCKS;
7879+
let max_cltv_expiry = self.best_block.read().unwrap().height() + CLTV_FAR_FAR_AWAY
7880+
+ LATENCY_GRACE_PERIOD_BLOCKS;
78807881
let payee_tlvs = ReceiveTlvs {
78817882
payment_secret,
78827883
payment_constraints: PaymentConstraints {

0 commit comments

Comments
 (0)