routing: ensure we create a pruneViewSnapshot for route sessions
In this commit, we fix an existing bug that could at times lead to a panic if a user manually crafts a route via SendToRoute, and that route results in a payment error. The fix is simple: create the map even though it won't be used in the sessions since the user is feeding the router manual routes.
This commit is contained in:
parent
03650bbb18
commit
e13f96e64b
@ -249,9 +249,10 @@ func (m *missionControl) NewPaymentSession(routeHints [][]HopHint,
|
|||||||
// used for things like channel rebalancing, and swaps.
|
// used for things like channel rebalancing, and swaps.
|
||||||
func (m *missionControl) NewPaymentSessionFromRoutes(routes []*Route) *paymentSession {
|
func (m *missionControl) NewPaymentSessionFromRoutes(routes []*Route) *paymentSession {
|
||||||
return &paymentSession{
|
return &paymentSession{
|
||||||
haveRoutes: true,
|
pruneViewSnapshot: m.GraphPruneView(),
|
||||||
preBuiltRoutes: routes,
|
haveRoutes: true,
|
||||||
mc: m,
|
preBuiltRoutes: routes,
|
||||||
|
mc: m,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user