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

Function sortRouteTableEntries

core/ipc_handler.go:405–412  ·  view source on GitHub ↗
(entries []*protocol.RouteTableEntry)

Source from the content-addressed store, hash-verified

403}
404
405func sortRouteTableEntries(entries []*protocol.RouteTableEntry) {
406 slices.SortFunc(entries, func(a, b *protocol.RouteTableEntry) int {
407 if c := cmp.Compare(a.Prefix, b.Prefix); c != 0 {
408 return c
409 }
410 return cmp.Compare(a.Nh, b.Nh)
411 })
412}
413
414func handleIPCProbe(n *Nylon, req *protocol.ProbeRequest) *protocol.IpcResponse {
415 neigh := n.RouterState.GetNeighbour(state.NodeId(req.PeerId))

Callers 1

buildRouteTablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected