mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
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:
@@ -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