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,6 +249,7 @@ func (m *missionControl) NewPaymentSession(routeHints [][]HopHint,
|
||||
// used for things like channel rebalancing, and swaps.
|
||||
func (m *missionControl) NewPaymentSessionFromRoutes(routes []*Route) *paymentSession {
|
||||
return &paymentSession{
|
||||
pruneViewSnapshot: m.GraphPruneView(),
|
||||
haveRoutes: true,
|
||||
preBuiltRoutes: routes,
|
||||
mc: m,
|
||||
|
Loading…
Reference in New Issue
Block a user