mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
routing: dont include final hop cltv in blinded path
Only include the final hop's cltv delta in the total timelock calculation if the route does not include a blinded path. This is because in a blinded path, the final hops final cltv delta will be included in the blinded path's accumlated cltv delta value. With this commit, we remove the responsibility of remembering not to set the `finalHop.cltvDelta` from the caller of `newRoute`. The relevant test is updated accordingly.
This commit is contained in:
@@ -156,6 +156,10 @@ type Invoice struct {
|
||||
// This field is un-exported and can only be read by the
|
||||
// MinFinalCLTVExpiry() method. By forcing callers to read via this
|
||||
// method, we can easily enforce the default if not specified.
|
||||
//
|
||||
// NOTE: this field is ignored in the case that the invoice contains
|
||||
// blinded paths since then the final minimum cltv expiry delta is
|
||||
// expected to be included in the route's accumulated CLTV delta value.
|
||||
minFinalCLTVExpiry *uint64
|
||||
|
||||
// Description is a short description of the purpose of this invoice.
|
||||
|
Reference in New Issue
Block a user