routing: use absolute final expiry in pathfinding

This commit is contained in:
Joost Jager
2019-12-17 11:55:03 +01:00
parent e546a2c42b
commit 72a6383975
7 changed files with 48 additions and 37 deletions

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