diff --git a/cmd/server/routes.go b/cmd/server/routes.go index c778b91f..02704b03 100644 --- a/cmd/server/routes.go +++ b/cmd/server/routes.go @@ -1421,11 +1421,17 @@ func (s *Server) handleNodePaths(w http.ResponseWriter, r *http.Request) { pathGroups := map[string]*pathAgg{} totalTransmissions := 0 hopCache := make(map[string]*nodeInfo) + // Anchor the resolver with the node being queried so tier-1/2 hop-context + // resolution lights up when a hop prefix matches the destination node + // (handleNodePaths aggregates paths terminating at lowerPK). Passing nil + // here re-introduced regression #1197 in production. See + // resolve_context_callsites_test.go. + hopContext := []string{lowerPK} resolveHop := func(hop string) *nodeInfo { if cached, ok := hopCache[hop]; ok { return cached } - r, _, _ := pm.resolveWithContext(hop, nil, s.store.graph) + r, _, _ := pm.resolveWithContext(hop, hopContext, s.store.graph) hopCache[hop] = r return r }