]> git.bitcoin.ninja Git - rust-lightning/commit
Fix sender double-including shadow offset in CLTV expiry height.
authorValentine Wallace <vwallace@protonmail.com>
Wed, 20 Dec 2023 19:04:04 +0000 (14:04 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Tue, 16 Jan 2024 22:46:41 +0000 (17:46 -0500)
commit027aef2b64b9f3e1bb9520e607e00d48a69e7f05
treef2ac48c7352ab3e4a7facc85276032ff7db4bb6d
parent6e6bd44138e0674cda1c0034b0e1d4b48e54204d
Fix sender double-including shadow offset in CLTV expiry height.

The excess delta is included in the final RouteHop::cltv_expiry_delta, so by
adding it explicitly to cur_cltv we were erroneously including it twice in the
total cltv expiry.

This could've add up to an extra MAX_SHADOW_CLTV_DELTA_OFFSET (432) blocks to
the total cltv expiry.
lightning/src/ln/blinded_payment_tests.rs
lightning/src/ln/onion_utils.rs