lightning icon indicating copy to clipboard operation
lightning copied to clipboard

pay: Enforce maxdelay for direct channel payments

Open wqxoxo opened this issue 1 month ago • 1 comments

Fixes #8609

When paying through a direct channel, direct_pay_override() creates a route bypassing the normal routing path, which skips the CLTV budget check in payment_getroute(). This allows payments to succeed even when maxdelay is set below the required min_final_cltv_expiry.

Add a check in direct_pay_override() to verify the required CLTV doesn't exceed cltv_budget before using the direct channel shortcut.

wqxoxo avatar Nov 28 '25 09:11 wqxoxo

BTW, our plan is to deprecate pay in favor of xpay....

rustyrussell avatar Nov 28 '25 22:11 rustyrussell

ACK https://github.com/ElementsProject/lightning/pull/8740/commits/b0a4743697d19b158ef3092b12cf33ab7b857122

cdecker avatar Dec 19 '25 11:12 cdecker