MCPcopy Create free account
hub / github.com/encodeous/nylon / buildNeighRoutes

Function buildNeighRoutes

core/ipc_handler.go:234–243  ·  view source on GitHub ↗
(neigh *state.Neighbour)

Source from the content-addressed store, hash-verified

232}
233
234func buildNeighRoutes(neigh *state.Neighbour) []*protocol.NeighRoute {
235 routes := make([]*protocol.NeighRoute, 0, len(neigh.Routes))
236 for _, route := range neigh.Routes {
237 routes = append(routes, neighRouteProto(route))
238 }
239 slices.SortFunc(routes, func(a, b *protocol.NeighRoute) int {
240 return comparePubRoute(a.PubRoute, b.PubRoute)
241 })
242 return routes
243}
244
245func buildRouteTables(n *Nylon) *protocol.RouteTables {
246 tables := &protocol.RouteTables{}

Callers 1

buildNeighboursFunction · 0.85

Calls 2

neighRouteProtoFunction · 0.85
comparePubRouteFunction · 0.85

Tested by

no test coverage detected