policy/v2: fix via grants in BuildPeerMap, MatchersForNode, and ViaRoutesForPeer
Use per-node compilation path for via grants in BuildPeerMap and MatchersForNode to ensure via-granted nodes appear in peer maps. Fix ViaRoutesForPeer golden test route inference to correctly resolve via grant effects. Updates #2180
This commit is contained in:
parent
6a55f7d731
commit
c36cedc32f
3 changed files with 244 additions and 95 deletions
|
|
@ -693,7 +693,11 @@ func (s *State) ListPeers(nodeID types.NodeID, peerIDs ...types.NodeID) views.Sl
|
|||
return s.nodeStore.ListPeers(nodeID)
|
||||
}
|
||||
|
||||
// For specific peerIDs, filter from all nodes
|
||||
// For specific peerIDs, filter from all nodes.
|
||||
// This path is used for incremental updates (NodeAdded, NodeChanged)
|
||||
// where the caller already knows which peer IDs are involved.
|
||||
// The peer visibility filtering happens in the mapper's buildTailPeers
|
||||
// via MatchersForNode/ReduceNodes.
|
||||
allNodes := s.nodeStore.ListNodes()
|
||||
|
||||
nodeIDSet := make(map[types.NodeID]struct{}, len(peerIDs))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue