Merge pull request #4596 from guggero/router-fix

routerrpc: pass in probability source
This commit is contained in:
Olaoluwa Osuntokun 2020-09-04 12:28:55 -07:00 committed by GitHub
commit 16d564e2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -320,11 +320,13 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
// that target amount, we'll only request a single route. Set a
// restriction for the default CLTV limit, otherwise we can find a route
// that exceeds it and is useless to us.
mc := s.cfg.RouterBackend.MissionControl
route, err := s.cfg.Router.FindRoute(
s.cfg.RouterBackend.SelfNode, destNode, amtMsat,
&routing.RestrictParams{
FeeLimit: feeLimit,
CltvLimit: s.cfg.RouterBackend.MaxTotalTimelock,
FeeLimit: feeLimit,
CltvLimit: s.cfg.RouterBackend.MaxTotalTimelock,
ProbabilitySource: mc.GetProbability,
}, nil, nil, s.cfg.RouterBackend.DefaultFinalCltvDelta,
)
if err != nil {