Use consistent cltv_expiry_delta in ForwardTlvs
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 11 Jan 2024 19:13:12 +0000 (13:13 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 16 Jan 2024 22:59:27 +0000 (16:59 -0600)
commit8053aa3df43e548561709a7453f410f85c353e01
treeef363cf7c135c551497b79e484a1def7b1d43c09
parentea5de93dd9e646124c13fd5c3da4150d3b9eb9f7
Use consistent cltv_expiry_delta in ForwardTlvs

When converting from CounterpartyForwardingInfo to PaymentRelay, the
cltv_expiry_delta is copied. Then, when forming a blinded payment path,
the value is mutated so that esoteric values don't reveal information
about the path. However, the value was only used in computing
PaymentConstraints and wasn't actually updated in PaymentRelay. Move the
logic for modifying the cltv_expiry_delta to the conversion code to
avoid this inconsistency.
lightning/src/blinded_path/payment.rs
lightning/src/routing/router.rs