router: return probability from findPath
The returned probability can then be used in QueryRoutes to not having to reconstruct the probability.
This commit is contained in:
9 files changed
+47
-45
No files matched your search
@@ -209,11 +209,10 @@ func TestRequestRoute(t *testing.T) {
|
||||
}
|
||||
|
||||
// Override pathfinder with a mock.
|
||||
session.pathFinder = func(
|
||||
g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
source, target route.Vertex, amt lnwire.MilliSatoshi,
|
||||
timePref float64,
|
||||
finalHtlcExpiry int32) ([]*channeldb.CachedEdgePolicy, error) {
|
||||
session.pathFinder = func(_ *graphParams, r *RestrictParams,
|
||||
_ *PathFindingConfig, _, _ route.Vertex, _ lnwire.MilliSatoshi,
|
||||
_ float64, _ int32) ([]*channeldb.CachedEdgePolicy, float64,
|
||||
error) {
|
||||
|
||||
// We expect find path to receive a cltv limit excluding the
|
||||
// final cltv delta (including the block padding).
|
||||
@@ -232,7 +231,7 @@ func TestRequestRoute(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
return path, nil
|
||||
return path, 1.0, nil
|
||||
}
|
||||
|
||||
route, err := session.RequestRoute(
|
||||
|
||||
Reference in new issue
Block a user