diff --git a/routing/missioncontrol.go b/routing/missioncontrol.go index 2534c2e6d9..4216692779 100644 --- a/routing/missioncontrol.go +++ b/routing/missioncontrol.go @@ -76,6 +76,11 @@ const ( // control name space. This is used as the sub-bucket key within the // top level DB bucket to store mission control results. DefaultMissionControlNamespace = "default" + + // BlindedPathMissionControlNamespace is the name of the mission control + // namespace where results from successful blinded path receives will + // be stored. + BlindedPathMissionControlNamespace = "blinded-paths" ) var ( diff --git a/rpcserver.go b/rpcserver.go index f814472768..35c8bc33af 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -5829,6 +5829,14 @@ func (r *rpcServer) AddInvoice(ctx context.Context, "be included in each path") } + blindedPathMC, err := r.server.missionController.GetNamespacedStore( + routing.BlindedPathMissionControlNamespace, + ) + if err != nil { + return nil, fmt.Errorf("could not initialise mission control "+ + "in the blinded paths namespace: %w", err) + } + addInvoiceCfg := &invoicesrpc.AddInvoiceConfig{ AddInvoice: r.server.invoices.AddInvoice, IsChannelActive: r.server.htlcSwitch.HasActiveLink, @@ -5867,8 +5875,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context, []*route.Route, error) { return r.server.chanRouter.FindBlindedPaths( - r.selfNode, amt, - r.server.defaultMC.GetProbability, + r.selfNode, amt, blindedPathMC.GetProbability, blindingRestrictions, ) }, diff --git a/server.go b/server.go index a285c3eb52..2e17e09521 100644 --- a/server.go +++ b/server.go @@ -932,7 +932,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr, } blindedPathMC, err := s.missionController.GetNamespacedStore( - "blinded-path", + routing.BlindedPathMissionControlNamespace, ) if err != nil { return nil, fmt.Errorf("can't create mission control in the "+