Skip to content

limit max_total_cltv_expiry_delta for pathfinding - #318

Merged
carlaKC merged 1 commit into
bitcoin-dev-project:mainfrom
elnosh:fix-cltv-delta-limit
Sep 15, 2026
Merged

carlaKC merged 1 commit into
bitcoin-dev-project:mainfrom
elnosh:fix-cltv-delta-limit

Conversation

@elnosh

@elnosh elnosh commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

I was running a simulation using channel policies from mainnet graph and found out some set the cltv_expiry_delta to 2016...
For some reason, we had set to .with_max_total_cltv_expiry_delta(u32::MAX) meaning that it will build routes with any delta. It ended up building a route where it ended up > 2016 blocks which is above the protocol recommended value to fail a HTLC. This caused some shutdowns in the simulation I was running. This will now use the LDK default of 1008.

Previously we were ignoring the 2016 limit for cltv delta
so we could end up building a route for more than 2016
which any node should reject. This will now use LDK's default
of 1008.
@carlaKC
carlaKC merged commit c3632c6 into bitcoin-dev-project:main Sep 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants