routing: use absolute final expiry in pathfinding

This commit is contained in:
Joost Jager committed 2019-12-20 11:00:00 +01:00
1 parent e546a2c42b
commit 72a6383975
7 files changed
+48 -37

No files matched your search

+3 -1
View File
@@ -113,6 +113,8 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
return nil, err
}
finalHtlcExpiry := int32(height) + int32(finalCltvDelta)
path, err := p.pathFinder(
&graphParams{
graph: ss.Graph,
@@ -121,7 +123,7 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
},
restrictions, &ss.PathFindingConfig,
ss.SelfNode.PubKeyBytes, payment.Target,
payment.Amount,
payment.Amount, finalHtlcExpiry,
)
if err != nil {
return nil, err