]> git.bitcoin.ninja Git - rust-lightning/commit
fix: use the update_add_htlc's cltv_expiry for comparison
authorVladimir Fomene <vladimirfomene@gmail.com>
Mon, 2 Oct 2023 19:05:42 +0000 (22:05 +0300)
committerVladimir Fomene <vladimirfomene@gmail.com>
Fri, 13 Oct 2023 11:05:21 +0000 (14:05 +0300)
commit33715e87d8adf698195c30099577427d77a2b636
tree9dfb2d3276a6a12fc223353f02f59d36b56903d4
parent6cafba9f5bc5c67d2ba302d2f53082ef22685b42
fix: use the update_add_htlc's cltv_expiry for comparison

As noted in BOLT 4, we should be using the update_add_htlc's cltv_expiry,
not the CLTV expiry set by the sender in the onion for this comparison.
See here: https://github.com/lightning/bolts/blob/4dcc377209509b13cf89a4b91fde7d478f5b46d8/04-onion-routing.md?plain=1#L334
lightning/src/ln/channelmanager.rs