routing: create PathFindingConfig for global parameters

This commit is contained in:
Joost Jager committed 2019-07-18 15:49:25 +02:00
1 parent 377b7bf3ce
commit 34b264a3d8
9 files changed
+83 -56

No files matched your search

+6 -7
View File
@@ -83,12 +83,10 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
ss := p.sessionSource
restrictions := &RestrictParams{
ProbabilitySource: ss.MissionControl.GetEdgeProbability,
FeeLimit: payment.FeeLimit,
OutgoingChannelID: payment.OutgoingChannelID,
CltvLimit: cltvLimit,
PaymentAttemptPenalty: ss.PaymentAttemptPenalty,
MinProbability: ss.MinRouteProbability,
ProbabilitySource: ss.MissionControl.GetEdgeProbability,
FeeLimit: payment.FeeLimit,
OutgoingChannelID: payment.OutgoingChannelID,
CltvLimit: cltvLimit,
}
path, err := p.pathFinder(
@@ -97,7 +95,8 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
additionalEdges: p.additionalEdges,
bandwidthHints: p.bandwidthHints,
},
restrictions, ss.SelfNode.PubKeyBytes, payment.Target,
restrictions, &ss.PathFindingConfig,
ss.SelfNode.PubKeyBytes, payment.Target,
payment.Amount,
)
if err != nil {